Show / Hide Table of Contents

Class Int64Extensions

Extension methods for long.

Inheritance
object
Int64Extensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: GlitchedPolygons.ExtensionMethods
Assembly: GlitchedPolygons.ExtensionMethods.dll
Syntax
public static class Int64Extensions

Methods

| Improve this Doc View Source

BytesToFileSizeString(long)

Gets the passed fileSizeInBytes as a human readable file size string (e.g. "5 KB" or "20 MB").

Declaration
public static string BytesToFileSizeString(this long fileSizeInBytes)
Parameters
Type Name Description
long fileSizeInBytes

The bytes (for example a file whose size you want to convert into a human readable string).

Returns
Type Description
string

A human readable file size string that represents the passed fileSizeInBytes.

| Improve this Doc View Source

ExcelColumnNumberToName(long)

Converts an excel column number such as 28 to its equivalent column address name (in the case of 28 for example that would be "AB").

Declaration
public static string ExcelColumnNumberToName(this long columnNumber)
Parameters
Type Name Description
long columnNumber

Column number to convert to Excel column address string format.

Returns
Type Description
string

Column address/name, e.g. "A", "B", "C", "AB", etc...

| Improve this Doc View Source

FromUnixTimeMilliseconds(long)

Converts a Unix timestamp (milliseconds since 1970-01-01 00:00:00.000 UTC) to a DateTime (in UTC).

Declaration
public static DateTime FromUnixTimeMilliseconds(this long timestamp)
Parameters
Type Name Description
long timestamp

The Unix timestamp to convert.

Returns
Type Description
DateTime

The converted DateTime in UTC.

| Improve this Doc View Source

FromUnixTimeSeconds(long)

Converts a Unix timestamp (seconds since 1970-01-01T00:00:00Z) to a UTC DateTime.

Declaration
public static DateTime FromUnixTimeSeconds(this long timestamp)
Parameters
Type Name Description
long timestamp

The Unix timestamp to convert.

Returns
Type Description
DateTime

The converted DateTime in UTC.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX