Beispiel #1
0
        public static double ConvertUnit(string unitValueString, string toUnitString)
        {
            var unitValue = UnitValue.Parse(unitValueString);
            var toUnit    = Unit.Effective.InverseStringRepresentationLookup[toUnitString];

            return(unitValue.In(toUnit));
        }
Beispiel #2
0
        public static bool CanConvertTo(string unitValueString, string toUnitString)
        {
            var unitValue = UnitValue.Parse(unitValueString);

            return(unitValue.CanConvertTo(toUnitString));
        }