BinaryUnitInfoShortByte Property

Gets or sets the abbreviated version of the byte unit, singular.

Definition

Namespace: Ookii
Assembly: Ookii.BinarySize (in Ookii.BinarySize.dll) Version: 1.1.0+e86ae44c345422a1011f7fa7b6b715bf3d1a34ce
C#
public string ShortByte { get; set; }

Property Value

String
The abbreviated singular byte unit. The default value is "B".

Remarks

When formatting, the ShortByte property is only used if the value, when scaled to the prefix, is exactly one. For example, 1 B, 1 KiB, 1 PB, etc.

If the value is not exactly one, but is rounded to one by the number format used, the ShortBytes property is still used. For example, a value of 1.01 kibibytes, when using a format string of "0.# SiB", would be formatted as "1 KiB", using the plural version of the unit.

In the default (invariant) information, the singular and plural abbreviated units are the same.

Exceptions

ArgumentNullException The property is being set to .
InvalidOperationException The property is being set and the BinaryUnitInfo object is read-only.

See Also