BinarySizeOptions Enumeration

Determines how multiple-byte units are interpreted when parsing a string into a BinarySize value, when passed to the BinarySizeParse(String, BinarySizeOptions, NumberStyles, IFormatProvider) and BinarySizeTryParse(String, BinarySizeOptions, NumberStyles, IFormatProvider, BinarySize) methods.

Definition

Namespace: Ookii
Assembly: Ookii.BinarySize (in Ookii.BinarySize.dll) Version: 1.2.0+20f0bdf981c7baf115c68ccab612b1a031efcb4d
C#
[FlagsAttribute]
public enum BinarySizeOptions

Remarks

This enumeration supports a bitwise combination of its member values.

Members

Default0 Use the default interpretation, where 1 KB equals 1 KiB equals 1,024 bytes, and 1 MB equals 1 MiB equals 1,048,576 bytes, and so on. Only abbreviated (short) units are allowed.
UseIecStandard1 Use the interpretation suggested by the IEC standard, where 1 kB equals 1,000 bytes, 1 KiB equals 1,024 bytes, 1 MB equals 1,000,000 bytes, 1 MiB equals 1,048,576 bytes, and so on.
AllowLongUnits2 Allow the use of unabbreviated (long) units, as defined by the BinaryUnitInfo class. Typically, these are units written out fully such as "kilobyte". If the AllowLongUnitsOnly flag is not present, both short and long units are accepted.
AllowLongUnitsOnly4 Only allow the use of unabbreviated (long) units, as defined by the BinaryUnitInfo class. Typically, these are units written out fully such as "kilobyte". Abbreviated (short) units will not be accepted. Implies AllowLongUnits.

See Also