コード例 #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);
 }