Prose.ByteSize
ReferencesProvides utility methods for converting and formatting bits and bytes. Code copied from: https://github.com/omar/ByteSize
Constructors
Fields
Properties
Methods
CompareTo
#Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Parameters:
| other (Prose.ByteSize) | An object to compare with this instance. |
GetHashCode
#Returns the hash code for this instance.
Returns: A 32-bit signed integer that is the hash code for this instance.
Overrides: ValueType.GetHashCode
ToString
#Converts the value of the current ByteSize object to a string. The metric prefix symbol (bit, byte, kilo, mega, giga, tera) used is the largest metric prefix such that the corresponding value is greater than or equal to one.
Overrides: ValueType.ToString
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| Prose.ByteSize | + | Prose.ByteSize | Prose.ByteSize | Add two sizes. |
| Prose.ByteSize | == | Prose.ByteSize | bool | Test two sizes for equality. |
| Prose.ByteSize | > | Prose.ByteSize | bool | Test two sizes for larger than ness. |
| Prose.ByteSize | >= | Prose.ByteSize | bool | Test two sizes for larger than ness. |
| Prose.ByteSize | != | Prose.ByteSize | bool | Test two sizes for inequality. |
| Prose.ByteSize | < | Prose.ByteSize | bool | Test two sizes for smaller than ness. |
| Prose.ByteSize | <= | Prose.ByteSize | bool | Test two sizes for smaller than ness. |
| Prose.ByteSize | - | Prose.ByteSize | Prose.ByteSize | Subtract two sizes. |
| - | Prose.ByteSize | Prose.ByteSize | Negate a size. | |