CreateUnit Method
Definition
CreateUnit(string, string, string, double, IPrefix, Action<UnitFormatOptions>)
Creates a custom unit of measure.
public static IPrefixUnit CreateUnit(string category, string name, string symbol, double value, IPrefix prefix, Action<UnitFormatOptions> setup = null)
Parameters
categorystringThe category of the unit.
namestringThe name of the unit.
symbolstringThe symbol of the unit.
valuedoubleThe value of the unit.
prefixIPrefixThe prefix of the unit.
setupAction<UnitFormatOptions>The UnitFormatOptions which may be configured.
Returns
- IPrefixUnit
A custom unit of measure.