示例#1
0
 /// <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);
     }
 }
示例#2
0
 /// <summary>
 /// Creates an empty set.
 /// </summary>
 public CopyOnWriteArraySet()
 {
     _array = new CopyOnWriteArray <T>();
 }