Пример #1
0
        public int IndexOf(object value)
        {
            T[] elementData = this._array;
            int length      = elementData.Length;

            return(CopyOnWriteArray <T> .IndexOf((T)value, elementData, length));
        }
Пример #2
0
        public int IndexOf(T item)
        {
            T[] elementData = this._array;
            int length      = elementData.Length;

            return(CopyOnWriteArray <T> .IndexOf(item, elementData, length));
        }
 /// <summary>
 /// Creates a set containing all of the elements of the specified collection.
 /// </summary>
 /// <param name="collection"></param>
 public CopyOnWriteArraySet(ICollection collection)
 {
     _array = new CopyOnWriteArray <T>();
     foreach (object obj in collection)
     {
         _array.Add((T)obj);
     }
 }
 /// <summary>
 /// Creates an empty set.
 /// </summary>
 public CopyOnWriteArraySet()
 {
     _array = new CopyOnWriteArray <T>();
 }