Пример #1
0
 public static TypeToken Max(TypeToken first, TypeToken second)
 {
     if (!Numeric(first) || !Numeric(second))
     {
         return(null);
     }
     if (first == Float || second == Float)
     {
         return(Float);
     }
     if (first == Int || second == Int)
     {
         return(Int);
     }
     return(Char);
 }
Пример #2
0
 public static bool Numeric(TypeToken type)
 {
     return(type == Int || type == Float || type == Char);
 }