コード例 #1
0
 public static object ToTableType(this Dictionary <int, decimal> values)
 {
     if (values.Count == 0)
     {
         return(IntDecimalCollection.EmptyTable);
     }
     else
     {
         IntDecimalCollection collection = new IntDecimalCollection();
         collection.AddRange(values.Select(v => new Pair <int, decimal>(v.Key, v.Value)));
         return(collection);
     }
 }
コード例 #2
0
 public static object ToTableType(this IEnumerable <Pair <int, decimal> > values)
 {
     if (values.Count() == 0)
     {
         return(IntDecimalCollection.EmptyTable);
     }
     else
     {
         IntDecimalCollection collection = new IntDecimalCollection();
         collection.AddRange(values);
         return(collection);
     }
 }