Show / Hide Table of Contents

Class BitUnit

Represents a unit of measurement for bits and is used with measurement of data.

Inheritance
Object
PrefixUnit
BitUnit
Implements
IPrefixUnit
IUnit
IEquatable<IUnit>
Inherited Members
PrefixUnit.UnitName
PrefixUnit.UnitSymbol
PrefixUnit.UnitValue
PrefixUnit.Prefix
PrefixUnit.PrefixValue
PrefixUnit.Equals(IUnit)
PrefixUnit.ToString()
PrefixUnit.ToString(Action<UnitFormatOptions>)
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public sealed class BitUnit : PrefixUnit, IPrefixUnit, IUnit, IEquatable<IUnit>

Constructors

| Improve this Doc View Source

BitUnit(Double, IPrefixMultiple, Action<UnitFormatOptions>)

Initializes a new instance of the BitUnit struct.

Declaration
public BitUnit(double value, IPrefixMultiple prefix, Action<UnitFormatOptions> setup = null)
Parameters
Type Name Description
Double value

The value of this unit expressed as bits.

IPrefixMultiple prefix

The prefix to associate with this unit.

Action<UnitFormatOptions> setup

The UnitFormatOptions which may be configured.

Exceptions
Type Condition
ArgumentOutOfRangeException

value is lower than 0 -or- prefix is less than a metric-multiple Kilo.

Fields

| Improve this Doc View Source

Name

Defines the name of a bit unit.

Declaration
public const string Name = "bit"
Field Value
Type Description
String
| Improve this Doc View Source

Symbol

Defines the symbol of a bit unit.

Declaration
public const string Symbol = "b"
Field Value
Type Description
String

Operators

| Improve this Doc View Source

Implicit(BitUnit to Double)

Performs an implicit conversion from BitUnit to Double.

Declaration
public static implicit operator double (BitUnit unit)
Parameters
Type Name Description
BitUnit unit

The ByteUnit to convert.

Returns
Type Description
Double

A Double that is equivalent to unit.

Implements

IPrefixUnit
IUnit
System.IEquatable<T>

See Also

PrefixUnit
ByteUnit
BinaryPrefix
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX