Exemple #1
0
 /// <summary>
 /// Creates set from another set
 /// </summary>
 /// <param name="set"></param>
 public CustomSet(CustomSet <T> set)
 {
     Collection = new CustomCollection <T>(set.Collection);
 }
Exemple #2
0
 public CustomSet(IEnumerable <T> elements) : this()
 {
     Collection = new CustomCollection <T>(elements.ToArray());
 }
Exemple #3
0
 /// <summary>
 /// Creates set with specified size
 /// </summary>
 /// <param name="size"></param>
 public CustomSet(int size = 0)
 {
     Collection = new CustomCollection <T>(size);
 }
 public void Clear() => collection = new CustomCollection <T>(Size);
Exemple #5
0
 public CustomCollection(CustomCollection <T> collection) : this(collection.elements)
 {
     end = collection.Count;
 }
Exemple #6
0
 protected bool Equals(CustomCollection <T> other)
 {
     return(Equals(elements, other.elements) && end == other.end && pointer == other.pointer && IsReadOnly == other.IsReadOnly);
 }