Class MetricPrefixTable
- Namespace
- Codebelt.Unitify
- Assembly
- Codebelt.Unitify.dll
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
-
ObjectMetricPrefixTable
- Implements
-
IEquatable<IUnit>IEnumerable<IPrefixUnit>IEnumerable
- 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(Boolean, Boolean, Boolean)
Returns an aggregated System.String of all multiple and sub-multiple prefix of this instance.
public string ToAggregateString(bool includeMultiples = true, bool includeSubmultiples = true, bool includeUnit = true)
Parameters
includeMultiples
Booleanif set to
true
all multiple prefix is included in the aggregate.includeSubmultiples
Booleanif set to
true
all submultiple prefix is included in the aggregate.includeUnit
Booleanif set to
true
the base unit is included in the aggregate.
Returns
- String
An aggregated System.String of all multiple and sub-multiple prefix of this instance.
ToString()
Returns a System.String that represents the first prefix greater or equal to one of this instance.
public override string ToString()
Returns
- String
A System.String that represents the first prefix greater or equal to one of this instance.