Example #1
0
        public static MeasurementUnit MeasurementUnitFromString(string value)
        {
            if (_measurementUnits.ContainsValue2(value))
            {
                return(_measurementUnits.GetValue1(value));
            }

            throw new ArgumentException("must be a known MeasurementUnit abbreviation value", nameof(value));
        }