コード例 #1
0
 protected virtual void CopyItemsTo(T[] array, int arrayIndex)
 {
     using (IEnumerator <S> e = InnerStore.GetEnumerator())
     {
         while (e.MoveNext() && arrayIndex < array.Length)
         {
             array[arrayIndex++] = GetItem(e.Current);
         }
     }
 }
コード例 #2
0
 protected virtual bool ContainsItem(T value)
 {
     using (IEnumerator <S> e = InnerStore.GetEnumerator())
         while (e.MoveNext())
         {
             if (Equals(GetItem(e.Current), value))
             {
                 return(true);
             }
         }
     return(false);
 }