ByteSizeLib.ByteSize
Represents a byte size value with support for decimal (KiloByte) and
binary values (KibiByte).
Number of bits in 1 byte.
Bit symbol.
Number of bytes in 1 gibibyte.
Number of bytes in 1 gigabyte.
Number of bytes in 1 kibibyte.
Number of bytes in 1 kilobyte.
Number of bytes in 1 mebibyte.
Number of bytes in 1 megabyte.
Number of bytes in 1 pebibyte.
Number of bytes in 1 petabyte.
Number of bytes in 1 tebibyte.
Number of bytes in 1 terabyte.
Byte symbol.
Gibibyte symbol.
Gigabyte symbol.
Kibibyte symbol.
Kilobyte symbol.
Maximum number of allowed bits in an instance.
Mebibyte symbol.
Megabyte symbol.
Minimum number of allowed bits in an instance.
Pebibyte symbol.
Petabyte symbol.
Tebibyte symbol.
Terabyte symbol.
Gets the number of bits represented by this object.
Gets the number of bytes represented by this object.
Gets the number of gibibytes represented by this object.
Gets the number of gigabytes represented by this object.
Gets the number of kibibytes represented by this object.
Gets the number of kilobytes represented by this object.
Gets the largest whole number binary symbol.
Example:
- 1024 KiB will return MiB
- 1023 KiB will return KiB
Gets the largest whole number binary value.
Example:
- 1024 KiB will return 1
- 1023 KiB will return 1023
Gets the largest whole number decimal symbol.
Example:
- 1000 KB will return MB
- 999 KB will return KB
Gets the largest whole number decimal value.
Example:
- 1000 KB will return 1
- 999 KB will return 999
Gets the number of mebibytes represented by this object.
Gets the number of megabytes represented by this object.
Gets the number of pebibytes represented by this object.
Gets the number of petabytes represented by this object.
Gets the number of tebibytes represented by this object.
Gets the number of terabytes represented by this object.
Initializes a new instance of the ByteSize structure to the specified
number of units.
Initializes a new instance of the ByteSize structure to the specified
number of units.
Returns a new instance whose value is 1 byte less than this instance.
Divides two instances.
Indicates whether two instances have equal number of bits.
Indicates whether one instance has more bits than the other.
Indicates whether one instance has more bits or equal than the other.
Returns an instance whose value is 1 byte greater than this instance.
Indicates whether two instances have different number of bits.
Indicates whether one instance has less bits than the other.
Indicates whether one instance has less or equal bits than the other.
Multiply two instances.
Returns a new instance whose value is the negative value of the specified instance.
Converts the string representation of a binary or decimal byte to its ByteSize equivalent.
Converts the string representation of a binary or decimal byte to its ByteSize equivalent.
Converts the string representation of a binary or decimal byte to its ByteSize equivalent.
Converts the string representation of a binary or decimal byte to its ByteSize equivalent.
Return value indicates success or failure of the parsing.
public static bool TryParse(string s, NumberStyles numberStyles, IFormatProvider formatProvider, out ByteSize result)
Converts the string representation of a binary or decimal byte to its ByteSize equivalent.
Return value indicates success or failure of the parsing.
Returns a new ByteSize object whose value is the sum of the specified
value and this instance.
Compares this instance's bit count to the other instance's bit count.
Indicates whether an instance has equal number of bits to this instance.
Returns a new ByteSize object whose value is the difference of the specified
value and this instance.
Converts the value of the current object to a binary byte string.
The prefix symbol (bit, byte, kibi, mebi, etc.) used is the
largest prefix such that the corresponding value is greater than or
equal to one.
Converts the value of the current object to a binary byte string.
The prefix symbol (bit, byte, kibi, mebi, etc.) used is the
largest prefix such that the corresponding value is greater than or
equal to one.
Use ToString for decimal string representation.
Converts the value of the current object to a decimal byte string.
The prefix symbol (bit, byte, kilo, mega, etc.) used is the
largest prefix such that the corresponding value is greater than or
equal to one.
Use ToBinaryString for binary string representation.
Converts the value of the current object to a decimal byte string.
The prefix symbol (bit, byte, kilo, mega, etc.) used is the
largest prefix such that the corresponding value is greater than or
equal to one.
Use ToBinaryString for binary string representation.
Converts the value of the current object to a decimal byte string.
The prefix symbol (bit, byte, kilo, mega, etc.) used is the
largest prefix such that the corresponding value is greater than or
equal to one.
Use ToBinaryString for binary string representation.