Class PrefixUnit
Represents the prefix of a unit of measurement.
public class PrefixUnit : Unit, IEquatable<IUnit>, IPrefixUnit, IUnit, IBaseUnit
- Inheritance
-
PrefixUnit
- Implements
- Inherited Members
- Extension Methods
Constructors
PrefixUnit(IBaseUnit, double, IPrefix, Action<UnitFormatOptions>)
Initializes a new instance of the PrefixUnit class.
public PrefixUnit(IBaseUnit baseUnit, double value, IPrefix prefix = null, Action<UnitFormatOptions> setup = null)
Parameters
baseUnitIBaseUnitThe base unit of measurement.
valuedoubleThe value of this unit.
prefixIPrefixThe optional prefix to associate with this unit.
setupAction<UnitFormatOptions>The UnitFormatOptions which may be configured.
PrefixUnit(IUnit, IPrefix)
Initializes a new instance of the PrefixUnit class.
public PrefixUnit(IUnit unit, IPrefix prefix = null)
Parameters
unitIUnitThe unit of measure to shallow copy to this instance.
prefixIPrefixThe prefix to associate with this instance.
Properties
Prefix
Gets the prefix multiple to this unit.
public IPrefix Prefix { get; }
Property Value
- IPrefix
The prefix multiple to this unit.
Methods
ToString()
Returns a string that represents this instance.
public override string ToString()