示例#1
0
 public static decimal ToMetric(ImperialWeight weight)
 {
     if (weight == null)
     {
         throw new ArgumentNullException(nameof(weight));
     }
     return(weight.TotalKilos);
 }
示例#2
0
        public static decimal ToKilosFromPounds(decimal pounds)
        {
            var imperial = ImperialWeight.FromPounds(pounds);

            return(imperial.TotalKilos);
        }
示例#3
0
        public static decimal ToKilosFromOunces(decimal ounces)
        {
            var imperial = ImperialWeight.FromOunces(ounces);

            return(imperial.TotalKilos);
        }
示例#4
0
 public static decimal ToKilos(ImperialWeight result)
 {
     return(result.TotalKilos);
 }