Class Extensions
Helper extension methods
public static class Extensions
- Inheritance
-
Extensions
- Inherited Members
Fields
OneTrillion
There are 1 trillion mojo in a chia
public const decimal OneTrillion = 1000000000000
Field Value
- decimal
- Helper extension methods
Methods
AsChia(ulong)
Formats a value expressed in mojo to chia
public static string AsChia(this ulong mojo)
Parameters
mojo
ulongThe amount of mojo
Returns
- string
Formatted string expressed in a unit of chia
AsChia(ulong, IFormatProvider?)
Formats a value expressed in mojo to chia
public static string AsChia(this ulong mojo, IFormatProvider? provider)
Parameters
mojo
ulongThe amount of mojo
provider
IFormatProviderAn object that supplies culture-specific formatting information.
Returns
- string
Formatted string expressed in a unit of chia
AsChia(ulong, string?)
Formats a value expressed in mojo to chia
public static string AsChia(this ulong mojo, string? format)
Parameters
Returns
- string
Formatted string expressed in a unit of chia
AsChia(ulong, string?, IFormatProvider?)
Formats a value expressed in mojo to chia
public static string AsChia(this ulong mojo, string? format, IFormatProvider? provider)
Parameters
mojo
ulongThe amount of mojo
format
stringA numeric format string.
provider
IFormatProviderAn object that supplies culture-specific formatting information.
Returns
- string
Formatted string expressed in a unit of chia
ToBytesString(double, string)
Format a number of bytes in human readable format
public static string ToBytesString(this double byteCount, string format = "N3")
Parameters
Returns
- string
A human readable string
ToBytesString(int, string)
Format a number of bytes in human readable format
public static string ToBytesString(this int byteCount, string format = "N3")
Parameters
Returns
- string
A human readable string
ToBytesString(long, string)
Format a number of bytes in human readable format
public static string ToBytesString(this long byteCount, string format = "N3")
Parameters
Returns
- string
A human readable string
ToBytesString(BigInteger, string)
Format a number of bytes in human readable format
public static string ToBytesString(this BigInteger byteCount, string format = "N3")
Parameters
byteCount
BigIntegerThe number of bytes
format
stringReturn string culture format
Returns
- string
A human readable string
Remarks
Adapted from https://stackoverflow.com/questions/281640/how-do-i-get-a-human-readable-file-size-in-bytes-abbreviation-using-net
ToBytesString(UInt128, string)
Format a number of bytes in human readable format
public static string ToBytesString(this UInt128 byteCount, string format = "N3")
Parameters
Returns
- string
A human readable string
Remarks
Adapted from https://stackoverflow.com/questions/281640/how-do-i-get-a-human-readable-file-size-in-bytes-abbreviation-using-net
ToBytesString(uint, string)
Format a number of bytes in human readable format
public static string ToBytesString(this uint byteCount, string format = "N3")
Parameters
Returns
- string
A human readable string
ToBytesString(ulong, string)
Format a number of bytes in human readable format
public static string ToBytesString(this ulong byteCount, string format = "N3")
Parameters
Returns
- string
A human readable string
Remarks
Adapted from https://stackoverflow.com/questions/281640/how-do-i-get-a-human-readable-file-size-in-bytes-abbreviation-using-net
ToChia(ulong)
public static decimal ToChia(this ulong mojo)
Parameters
mojo
ulongThe amount of mojo
Returns
- decimal
The amount of chia
ToMojo(decimal)
public static ulong ToMojo(this decimal chia)
Parameters
chia
decimalThe amount of chia
Returns
- ulong
The amount of mojo