/// <summary> /// Creates set from another set /// </summary> /// <param name="set"></param> public CustomSet(CustomSet <T> set) { Collection = new CustomCollection <T>(set.Collection); }
public CustomSet(IEnumerable <T> elements) : this() { Collection = new CustomCollection <T>(elements.ToArray()); }
/// <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);
public CustomCollection(CustomCollection <T> collection) : this(collection.elements) { end = collection.Count; }
protected bool Equals(CustomCollection <T> other) { return(Equals(elements, other.elements) && end == other.end && pointer == other.pointer && IsReadOnly == other.IsReadOnly); }