IecBinarySize Structure

Provides a wrapper around the BinarySize structure that always uses BinarySizeOptionsUseIecStandard when parsing values from a string.

Definition

Namespace: Ookii
Assembly: Ookii.BinarySize (in Ookii.BinarySize.dll) Version: 1.2.0+20f0bdf981c7baf115c68ccab612b1a031efcb4d
C#
[SerializableAttribute]
[TypeConverterAttribute(typeof(IecBinarySizeConverter))]
public readonly struct IecBinarySize : IFormattable, 
	IXmlSerializable, ISpanFormattable, ISpanParsable<IecBinarySize>, IParsable<IecBinarySize>
Inheritance
Object    ValueType    IecBinarySize
Implements
IFormattable, IParsableIecBinarySize, ISpanFormattable, ISpanParsableIecBinarySize, IXmlSerializable

Remarks

Use this type if you need the parsing behavior to be different, and cannot pass a custom BinarySizeOptions value. For example, when the value is part of a serialized data type.

This structure only provides parsing and formatting functionality. For all other functions of the BinarySize structure, access the Value property.

Constructors

IecBinarySize(BinarySize) Initializes a new instance of the IecBinarySize structure.
IecBinarySize(Int64) Initializes a new instance of the IecBinarySize structure.

Properties

Value Gets the BinarySize value that is wrapped by this instance.

Methods

EqualsIndicates whether this instance and a specified object are equal.
(Inherited from ValueType)
GetHashCodeReturns the hash code for this instance.
(Inherited from ValueType)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Parse(ReadOnlySpanChar, IFormatProvider) Parses a span of characters into an IecBinarySize structure.
Parse(String, IFormatProvider) Parses a string into an IecBinarySize structure.
ToString Returns a string representation of the current value, using default formatting.
(Overrides ValueTypeToString)
ToString(String, IFormatProvider) Formats the value of the current BinarySize instance using the specified format.
TryFormatTries to format the value of the current instance into the provided span of characters.
TryParse(ReadOnlySpanChar, IFormatProvider, IecBinarySize) Tries to parse a span of characters into an IecBinarySize structure.
TryParse(String, IFormatProvider, IecBinarySize) Tries to parse a string into an IecBinarySize structure.

Operators

(IecBinarySize to Int64) Performs an explicit conversion from IecBinarySize to Int64.
(Int64 to IecBinarySize) Performs an explicit conversion from Int64 to IecBinarySize.
(BinarySize to IecBinarySize) Performs an implicit conversion from BinarySize to IecBinarySize.
(IecBinarySize to BinarySize) Performs an implicit conversion from IecBinarySize to BinarySize.

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also