Skip to main content

Class UnitFactory

Factory methods for unit creation

Assembly: Meadow.Units.dll​
View Source​
Declaration
public class UnitFactory

Methods​

CreateUnitFromCanonicalValue(double, string)​

Method to create a unit from its canonical value.

View Source​
Declaration
public static object CreateUnitFromCanonicalValue(double value, string unitTypeName)
Returns​

System.Object

Parameters​
TypeNameDescription
System.DoublevalueThe canonical value to use for creation
System.StringunitTypeNameThe (case-insensitive) name of the Unit to be created