[SerializableAttribute]
[TypeConverterAttribute(typeof(UBinarySizeConverter))]
public readonly struct UBinarySize : IEquatable<UBinarySize>,
IComparable<UBinarySize>, IComparable, IFormattable, IXmlSerializable,
ISpanFormattable, ISpanParsable<UBinarySize>, IParsable<UBinarySize>,
IBinaryNumber<UBinarySize>, IAdditionOperators<UBinarySize, UBinarySize, UBinarySize>,
IAdditiveIdentity<UBinarySize, UBinarySize>, IBitwiseOperators<UBinarySize, UBinarySize, UBinarySize>,
IComparisonOperators<UBinarySize, UBinarySize, bool>, IEqualityOperators<UBinarySize, UBinarySize, bool>,
IDecrementOperators<UBinarySize>, IDivisionOperators<UBinarySize, UBinarySize, UBinarySize>,
IIncrementOperators<UBinarySize>, IModulusOperators<UBinarySize, UBinarySize, UBinarySize>,
IMultiplicativeIdentity<UBinarySize, UBinarySize>, IMultiplyOperators<UBinarySize, UBinarySize, UBinarySize>,
INumber<UBinarySize>, INumberBase<UBinarySize>, ISubtractionOperators<UBinarySize, UBinarySize, UBinarySize>,
IUnaryNegationOperators<UBinarySize, UBinarySize>, IUnaryPlusOperators<UBinarySize, UBinarySize>,
IUtf8SpanFormattable, IUtf8SpanParsable<UBinarySize>, IMinMaxValue<UBinarySize>
<SerializableAttribute>
<TypeConverterAttribute(GetType(UBinarySizeConverter))>
Public Structure UBinarySize
Implements IEquatable(Of UBinarySize), IComparable(Of UBinarySize),
IComparable, IFormattable, IXmlSerializable, ISpanFormattable, ISpanParsable(Of UBinarySize),
IParsable(Of UBinarySize), IBinaryNumber(Of UBinarySize), IAdditionOperators(Of UBinarySize, UBinarySize, UBinarySize),
IAdditiveIdentity(Of UBinarySize, UBinarySize), IBitwiseOperators(Of UBinarySize, UBinarySize, UBinarySize),
IComparisonOperators(Of UBinarySize, UBinarySize, Boolean), IEqualityOperators(Of UBinarySize, UBinarySize, Boolean),
IDecrementOperators(Of UBinarySize), IDivisionOperators(Of UBinarySize, UBinarySize, UBinarySize),
IIncrementOperators(Of UBinarySize), IModulusOperators(Of UBinarySize, UBinarySize, UBinarySize),
IMultiplicativeIdentity(Of UBinarySize, UBinarySize), IMultiplyOperators(Of UBinarySize, UBinarySize, UBinarySize),
INumber(Of UBinarySize), INumberBase(Of UBinarySize), ISubtractionOperators(Of UBinarySize, UBinarySize, UBinarySize),
IUnaryNegationOperators(Of UBinarySize, UBinarySize), IUnaryPlusOperators(Of UBinarySize, UBinarySize),
IUtf8SpanFormattable, IUtf8SpanParsable(Of UBinarySize), IMinMaxValue(Of UBinarySize)
[SerializableAttribute]
[TypeConverterAttribute(typeof(UBinarySizeConverter))]
public value class UBinarySize : IEquatable<UBinarySize>,
IComparable<UBinarySize>, IComparable, IFormattable, IXmlSerializable,
ISpanFormattable, ISpanParsable<UBinarySize>, IParsable<UBinarySize>,
IBinaryNumber<UBinarySize>, IAdditionOperators<UBinarySize, UBinarySize, UBinarySize>,
IAdditiveIdentity<UBinarySize, UBinarySize>, IBitwiseOperators<UBinarySize, UBinarySize, UBinarySize>,
IComparisonOperators<UBinarySize, UBinarySize, bool>, IEqualityOperators<UBinarySize, UBinarySize, bool>,
IDecrementOperators<UBinarySize>, IDivisionOperators<UBinarySize, UBinarySize, UBinarySize>,
IIncrementOperators<UBinarySize>, IModulusOperators<UBinarySize, UBinarySize, UBinarySize>,
IMultiplicativeIdentity<UBinarySize, UBinarySize>, IMultiplyOperators<UBinarySize, UBinarySize, UBinarySize>,
INumber<UBinarySize>, INumberBase<UBinarySize>, ISubtractionOperators<UBinarySize, UBinarySize, UBinarySize>,
IUnaryNegationOperators<UBinarySize, UBinarySize>, IUnaryPlusOperators<UBinarySize, UBinarySize>,
IUtf8SpanFormattable, IUtf8SpanParsable<UBinarySize>, IMinMaxValue<UBinarySize>
[<SealedAttribute>]
[<SerializableAttribute>]
[<TypeConverterAttribute(typeof(UBinarySizeConverter))>]
type UBinarySize =
struct
inherit ValueType
interface IEquatable<UBinarySize>
interface IComparable<UBinarySize>
interface IComparable
interface IFormattable
interface IXmlSerializable
interface ISpanFormattable
interface ISpanParsable<UBinarySize>
interface IParsable<UBinarySize>
interface IBinaryNumber<UBinarySize>
interface IAdditionOperators<UBinarySize, UBinarySize, UBinarySize>
interface IAdditiveIdentity<UBinarySize, UBinarySize>
interface IBitwiseOperators<UBinarySize, UBinarySize, UBinarySize>
interface IComparisonOperators<UBinarySize, UBinarySize, bool>
interface IEqualityOperators<UBinarySize, UBinarySize, bool>
interface IDecrementOperators<UBinarySize>
interface IDivisionOperators<UBinarySize, UBinarySize, UBinarySize>
interface IIncrementOperators<UBinarySize>
interface IModulusOperators<UBinarySize, UBinarySize, UBinarySize>
interface IMultiplicativeIdentity<UBinarySize, UBinarySize>
interface IMultiplyOperators<UBinarySize, UBinarySize, UBinarySize>
interface INumber<UBinarySize>
interface INumberBase<UBinarySize>
interface ISubtractionOperators<UBinarySize, UBinarySize, UBinarySize>
interface IUnaryNegationOperators<UBinarySize, UBinarySize>
interface IUnaryPlusOperators<UBinarySize, UBinarySize>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<UBinarySize>
interface IMinMaxValue<UBinarySize>
end
The underlying value is stored as a UInt64, as a whole number of bytes. Scaling is only used when formatting, such as when using the ToString(String, IFormatProvider) method.
Instances of this structure can be created by parsing a string containing a unit with a binary prefix, such as "1.5 GiB".
By default, this structure uses the definition that "1 KB" == 1024 bytes, identical to "1 KiB", and "1 MB" == "1 MiB" == 1048576 bytes, and so on. This behavior can be changed using the BinarySizeOptions enumeration, and by using certain formatting strings used with the ToString(String, IFormatProvider) method. The UIecBinarySize structure provides a wrapper that defaults to the behavior of the BinarySizeOptionsUseIecStandard flag.
UBinarySize | Initializes a new instance of the UBinarySize structure with the specified value. |
AsExbi | Gets the value of this instance in exbibytes. |
AsGibi | Gets the value of this instance in gibibytes. |
AsKibi | Gets the value of this instance in kibibytes. |
AsMebi | Gets the value of this instance in mebibytes. |
AsPebi | Gets the value of this instance in pebibytes. |
AsTebi | Gets the value of this instance in tebibytes. |
Value | Gets the number of bytes represented by this instance. |
Add | Returns the sum of two UBinarySize values. |
CompareTo(Object) | 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. |
CompareTo(UBinarySize) | Compares this instance to a specified UBinarySize instance and returns an indication of their relative values. |
Divide | Divides one UBinarySize value by another. |
Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object)) |
Equals(UBinarySize) | Returns a value indicating whether this instance is equal to a specified UBinarySize value. |
FromExbi | Returns a UBinarySize that represents the specified number of exbibytes. |
FromGibi | Returns a UBinarySize that represents the specified number of gibibytes. |
FromKibi | Returns a UBinarySize that represents the specified number of kibibytes. |
FromMebi | Returns a UBinarySize that represents the specified number of mebibytes. |
FromPebi | Returns a UBinarySize that represents the specified number of pebibytes. |
FromTebi | Returns a UBinarySize that represents the specified number of tebibytes. |
GetHashCode | Returns the hash code for this instance. (Overrides ValueTypeGetHashCode) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
Multiply | Returns the product of two UBinarySize values. |
Parse(ReadOnlySpanChar, IFormatProvider) | Parses a span of characters into a UBinarySize structure. |
Parse(String, IFormatProvider) | Parses a string into a UBinarySize structure. |
Parse(ReadOnlySpanChar, BinarySizeOptions, NumberStyles, IFormatProvider) | Parses a span of characters into a UBinarySize structure. |
Parse(String, BinarySizeOptions, NumberStyles, IFormatProvider) | Parses a string into a UBinarySize structure. |
Remainder | Returns the remainder of dividing one UBinarySize value by another. |
Subtract | Subtracts one UBinarySize value from another. |
ToString |
Returns a string representation of the current value, using default formatting.
(Overrides ValueTypeToString) |
ToString(String, IFormatProvider) | Formats the value of the current UBinarySize instance using the specified format. |
TryFormat | Tries to format the value of the current instance into the provided span of characters. |
TryParse(ReadOnlySpanChar, UBinarySize) | Tries to parse a span of characters into a UBinarySize structure. |
TryParse(String, UBinarySize) | Tries to parse a string into a UBinarySize structure. |
TryParse(ReadOnlySpanChar, IFormatProvider, UBinarySize) | Tries to parse a span of characters into a UBinarySize structure. |
TryParse(String, IFormatProvider, UBinarySize) | Tries to parse a string into a UBinarySize structure. |
TryParse(ReadOnlySpanChar, BinarySizeOptions, NumberStyles, IFormatProvider, UBinarySize) | Tries to parse a span of characters into a UBinarySize structure. |
TryParse(String, BinarySizeOptions, NumberStyles, IFormatProvider, UBinarySize) | Tries to parse a string into a UBinarySize structure. |
Addition(UBinarySize, UBinarySize) | Adds two UBinarySize values. |
Addition(UBinarySize, UInt64) | Adds a UBinarySize value to a UInt64. |
Addition(UInt64, UBinarySize) | Adds a UInt64 value to a UBinarySize. |
BitwiseAnd(UBinarySize, UBinarySize) | Computes the bitwise-and of two UBinarySize values. |
BitwiseAnd(UBinarySize, UInt64) | Computes the bitwise-and of a UBinarySize value and a UInt64. |
BitwiseAnd(UInt64, UBinarySize) | Computes the bitwise-and of a UInt64 value and a UBinarySize. |
BitwiseOr(UBinarySize, UBinarySize) | Computes the bitwise-or of two UBinarySize values. |
BitwiseOr(UBinarySize, UInt64) | Computes the bitwise-or of a UBinarySize value and a UInt64. |
BitwiseOr(UInt64, UBinarySize) | Computes the bitwise-or of a UInt64 value and a UBinarySize. |
CheckedAddition(UBinarySize, UBinarySize) | Adds two UBinarySize values in a checked context. |
CheckedAddition(UBinarySize, UInt64) | Adds a UBinarySize value to a UInt64 in a checked context. |
CheckedAddition(UInt64, UBinarySize) | Adds a UInt64 value to a UBinarySize in a checked context. |
CheckedDecrement(UBinarySize) | Decrements a UBinarySize in a checked context. |
CheckedIncrement(UBinarySize) | Increments a UBinarySize in a checked context. |
CheckedMultiply(UBinarySize, UBinarySize) | Multiplies two UBinarySize values in a checked context. |
CheckedMultiply(UBinarySize, UInt64) | Multiplies a UBinarySize value by a UInt64 in a checked context. |
CheckedMultiply(UInt64, UBinarySize) | Multiplies a UInt64 value by a UBinarySize in a checked context. |
CheckedSubtraction(UBinarySize, UBinarySize) | Subtracts two UBinarySize values in a checked context. |
CheckedSubtraction(UBinarySize, UInt64) | Subtracts a UInt64 value from a UBinarySize in a checked context. |
CheckedSubtraction(UInt64, UBinarySize) | Subtracts a UBinarySize value from a UInt64 in a checked context. |
Decrement(UBinarySize) | Decrements a UBinarySize. |
Division(UBinarySize, UBinarySize) | Divides two UBinarySize values. |
Division(UBinarySize, UInt64) | Divides a UBinarySize value by a UInt64. |
Division(UInt64, UBinarySize) | Divides a UInt64 value by a UBinarySize. |
Equality(UBinarySize, UBinarySize) | Determines whether two specified UBinarySize values are the same. |
Equality(UBinarySize, UInt64) | Determines whether a UBinarySize value is the same as a UInt64 value. |
Equality(UInt64, UBinarySize) | Determines whether a UInt64 value is the same as a UBinarySize value. |
ExclusiveOr(UBinarySize, UBinarySize) | Computes the exclusive-or of two UBinarySize values. |
ExclusiveOr(UBinarySize, UInt64) | Computes the exclusive-or of a UBinarySize value and a UInt64. |
ExclusiveOr(UInt64, UBinarySize) | Computes the exclusive-or of a UInt64 value and a UBinarySize. |
(UBinarySize to UInt64) | Performs an explicit conversion from UBinarySize to UInt64. |
(UInt64 to UBinarySize) | Performs an implicit conversion from UInt64 to UBinarySize. |
GreaterThan(UBinarySize, UBinarySize) | Returns a value indicating whether a specified UBinarySize is greater than another UBinarySize. |
GreaterThan(UBinarySize, UInt64) | Returns a value indicating whether a specified UBinarySize is greater than a UInt64. |
GreaterThan(UInt64, UBinarySize) | Returns a value indicating whether a specified UInt64 is greater than a UBinarySize. |
GreaterThanOrEqual(UBinarySize, UBinarySize) | Returns a value indicating whether a specified UBinarySize is greater than or equal to another UBinarySize. |
GreaterThanOrEqual(UBinarySize, UInt64) | Returns a value indicating whether a specified UBinarySize is greater than or equal to a UInt64. |
GreaterThanOrEqual(UInt64, UBinarySize) | Returns a value indicating whether a specified UInt64 is greater than or equal to a UBinarySize. |
Increment(UBinarySize) | Increments a UBinarySize. |
Inequality(UBinarySize, UBinarySize) | Determines whether two specified UBinarySize values are different. |
Inequality(UBinarySize, UInt64) | Determines whether a UBinarySize value is different from a UInt64 value. |
Inequality(UInt64, UBinarySize) | Determines whether a UInt64 value is different from a UBinarySize value. |
LeftShift(UBinarySize, Int32) | Shifts the bits of a UBinarySize to the left. |
LessThan(UBinarySize, UBinarySize) | Returns a value indicating whether a specified UBinarySize is less than another UBinarySize. |
LessThan(UBinarySize, UInt64) | Returns a value indicating whether a specified UBinarySize is less than a UInt64. |
LessThan(UInt64, UBinarySize) | Returns a value indicating whether a specified UInt64 is less than a UBinarySize. |
LessThanOrEqual(UBinarySize, UBinarySize) | Returns a value indicating whether a specified UBinarySize is less than or equal to another UBinarySize. |
LessThanOrEqual(UBinarySize, UInt64) | Returns a value indicating whether a specified UBinarySize is less than or equal to a UInt64. |
LessThanOrEqual(UInt64, UBinarySize) | Returns a value indicating whether a specified UInt64 is less than or equal to a UBinarySize. |
Modulus(UBinarySize, UBinarySize) | Returns the remainder after dividing two UBinarySize values. |
Modulus(UBinarySize, UInt64) | Returns the remainder after dividing a UBinarySize value by a UInt64. |
Modulus(UInt64, UBinarySize) | Returns the remainder after dividing a UInt64 value by a UBinarySize. |
Multiply(UBinarySize, UBinarySize) | Multiplies two UBinarySize values. |
Multiply(UBinarySize, UInt64) | Multiplies a UBinarySize value by a UInt64. |
Multiply(UInt64, UBinarySize) | Multiplies a UInt64 value by a UBinarySize. |
OnesComplement(UBinarySize) | Computes the ones-complement representation of a UBinarySize. |
RightShift(UBinarySize, Int32) | Shifts the bits of a UBinarySize to the right. |
Subtraction(UBinarySize, UBinarySize) | Subtracts two UBinarySize values. |
Subtraction(UBinarySize, UInt64) | Subtracts a UInt64 value from a UBinarySize. |
Subtraction(UInt64, UBinarySize) | Subtracts a UBinarySize value from a UInt64. |
UnaryPlus(UBinarySize) | Returns the specified instance of UBinarySize. |
UnsignedRightShift(UBinarySize, Int32) | Shifts the bits of a UBinarySize to the right in an unsigned manner. |
Exbi | The size of an exbibyte (binary exabyte); 1,152,921,504,606,846,976 bytes. |
Gibi | The size of a gibibyte (binary gigabyte); 1,073,741,824 bytes. |
Kibi | The size of a kibibyte (binary kilobyte); 1,024 bytes. |
MaxValue | Represents the maximum UBinarySize value. |
Mebi | The size of a mebibyte (binary megabyte); 1,048,576 bytes. |
MinValue | Represents the minimum UBinarySize value. |
Pebi | The size of a pebibyte (binary petabyte); 1,125,899,906,842,624 bytes. |
Tebi | The size of a tebibyte (binary terabyte); 1,099,511,627,776 bytes. |
Zero | Gets a UBinarySize instance with a value of zero bytes. |