Class MultipleTable
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Provides a way to represent a table of prefixes that precedes a unit of measure to indicate a multiple of the unit. Implements the System.IEquatable<T>
public abstract class MultipleTable : IEquatable<IUnit>
- Inheritance
-
ObjectMultipleTable
- Implements
-
IEquatable<IUnit>
- Derived
Constructors
MultipleTable(IPrefixUnit)
Initializes a new instance of the MultipleTable class.
protected MultipleTable(IPrefixUnit unit)
Parameters
unit
IPrefixUnitThe instance of an object that implements the IPrefixUnit interface.
Exceptions
- System.ArgumentNullException
unit
cannot be null.
Properties
Unit
Gets the base unit of this table.
public IPrefixUnit Unit { get; }
Property Value
- IPrefixUnit
The base unit of this table.
Methods
Equals(IUnit)
Indicates whether the current object is equal to another object of the same type.
public virtual bool Equals(IUnit other)
Parameters
other
IUnitAn object to compare with this object.
Returns
- Boolean
true
if the current object is equal to theother
parameter; otherwise,false
.
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
public override bool Equals(object obj)
Parameters
obj
ObjectThe object to compare with the current object.
Returns
- Boolean
true
if the specified System.Object is equal to this instance; otherwise,false
.
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
- Int32
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
ToString()
Returns a System.String that represents largest metric-multiple prefix of this instance.
public override string ToString()
Returns
- String
A System.String that represents largest metric-multiple prefix of this instance.
Remarks
Evaluates the largest metric-multiple prefix that is greater or equal to 1 and returns that as either Binary or Decimal formatted.
Operators
Implicit(MultipleTable to Double)
Performs an implicit conversion from MultipleTable to System.Double.
public static implicit operator double (MultipleTable mt)
Parameters
mt
MultipleTableThe MultipleTable to convert.
Returns
- Double
A System.Double that is equivalent to
mt
.