Class BitUnit
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Represents a unit of measurement for bits and is used with measurement of data.
public sealed class BitUnit : PrefixUnit, IPrefixUnit, IUnit, IEquatable<IUnit>
- Inheritance
-
ObjectBitUnit
- Implements
-
IEquatable<IUnit>
- Inherited Members
Constructors
BitUnit(Double, IPrefixMultiple, Action<UnitFormatOptions>)
Initializes a new instance of the BitUnit struct.
public BitUnit(double value, IPrefixMultiple prefix, Action<UnitFormatOptions> setup = null)
Parameters
value
DoubleThe value of this unit expressed as bits.
prefix
IPrefixMultipleThe prefix to associate with this unit.
setup
Action<UnitFormatOptions>The UnitFormatOptions which may be configured.
Exceptions
- ArgumentOutOfRangeException
value
is lower than 0 -or-prefix
is less than a metric-multiple Kilo.
Fields
Name
Defines the name of a bit unit.
public const string Name = "bit"
Field Value
- String
Symbol
Defines the symbol of a bit unit.
public const string Symbol = "b"
Field Value
- String
Operators
Implicit(BitUnit to Double)
Performs an implicit conversion from BitUnit to System.Double.
public static implicit operator double (BitUnit unit)
Parameters
Returns
- Double
A System.Double that is equivalent to
unit
.