IsIntegerType() статический приватный Метод

static private IsIntegerType ( Type type ) : bool
type System.Type
Результат bool
Пример #1
0
 public ITransientAssociative assoc(object key, object val)
 {
     if (Util.IsIntegerType(key.GetType()))
     {
         int i = Util.ConvertToInt(key);
         return(assocN(i, val));
     }
     throw new ArgumentException("Key must be integer");
 }
Пример #2
0
 public object valAt(object key, object notFound)
 {
     EnsureEditable();
     if (Util.IsIntegerType(key.GetType()))
     {
         int i = Util.ConvertToInt(key);
         if (i >= 0 && i < count())
         {
             return(nth(i));
         }
     }
     return(notFound);
 }