/// <summary> /// Takes an array and adds the values of the array to the list if there is no item like it. /// </summary> /// <param name="collection">Аn array from which it takes values.</param> public void AddRange(ICustomArray <T> collection) { foreach (var item in (CustomArray <T>)collection) { list.Add(item); } }
public CustomHashSet(ICustomArray <T> array) { AddRange(array); }
/// <summary> /// Initialize new <typeparamref name="CustomArray"/> and add values from array to the List. /// </summary> /// <param name="collection">Values to add as an array.</param> public CustomList(ICustomArray <T> collection) : this() { this.AddRange(collection); }