Class MetricPrefixTable
Represents a table of metric prefixes for units of measure, optimized for metric measurement standards.
public class MetricPrefixTable : PrefixTable, IEquatable<IUnit>, IEnumerable<IPrefixUnit>, IEnumerable
- Inheritance
-
MetricPrefixTable
- Implements
- Inherited Members
- Extension Methods
Constructors
MetricPrefixTable(IUnit)
Initializes a new instance of the MetricPrefixTable class.
public MetricPrefixTable(IUnit unit)
Parameters
Methods
GetEnumerator()
Returns an enumerator that iterates through the multiples and submultiples of the base unit.
public override IEnumerator<IPrefixUnit> GetEnumerator()
Returns
- IEnumerator<IPrefixUnit>
An enumerator that can be used to iterate through multiples and submultiples of the base unit.
ToAggregateString(bool, bool, bool)
Returns an aggregated string of all multiple and sub-multiple prefix of this instance.
public string ToAggregateString(bool includeMultiples = true, bool includeSubmultiples = true, bool includeUnit = true)
Parameters
includeMultiplesboolif set to
trueall multiple prefix is included in the aggregate.includeSubmultiplesboolif set to
trueall submultiple prefix is included in the aggregate.includeUnitboolif set to
truethe base unit is included in the aggregate.
Returns
ToString()
Returns a string that represents the first prefix greater or equal to one of this instance.
public override string ToString()