Exemple #1
0
 void ICollection.CopyTo(Array array, int index)
 {
     if (this.Count == 0)
     {
         return;
     }
     if (array == null)
     {
         throw new ArgumentNullException("array");
     }
     if (index >= 0 && array.Length > index)
     {
         if (array.Length - index < this.Count)
         {
             throw new ArgumentException();
         }
         using (Class225.Struct77 @struct = this.class225_0.method_14())
         {
             while (@struct.MoveNext())
             {
                 Class222 <T> .Class227 @class = (Class222 <T> .Class227)@struct.Current;
                 array.SetValue(@class.gparam_0, index++);
             }
             return;
         }
     }
     throw new ArgumentOutOfRangeException("index");
 }
Exemple #2
0
 public void method_2(T[] gparam_0, int int_0, int int_1)
 {
     if (gparam_0 == null)
     {
         throw new ArgumentNullException("array");
     }
     if (int_0 < 0)
     {
         throw new ArgumentOutOfRangeException("index");
     }
     if (int_0 > gparam_0.Length)
     {
         throw new ArgumentException("index larger than largest valid index of array");
     }
     if (gparam_0.Length - int_0 < int_1)
     {
         throw new ArgumentException("destination array cannot hold the requested elements");
     }
     using (Class225.Struct77 @struct = this.class225_0.method_14())
     {
         while (@struct.MoveNext())
         {
             Class222 <T> .Class227 @class = (Class222 <T> .Class227)@struct.Current;
             if (int_1-- == 0)
             {
                 break;
             }
             gparam_0[int_0++] = @class.gparam_0;
         }
     }
 }