/// <summary> /// Parameterized constructor /// </summary> /// <param name="collection">The collection whose elements are copied to the new queue</param> public CustomQueue(IEnumerable <T> collection) { if (collection == null) { throw new ArgumentNullException(null, "collection cannot be null"); } _list = new CustomLinkedList <T>(collection); }
/// <summary> /// Parameterized constructor /// </summary> /// <param name="list">Given linked list</param> public CustomLinkedListEnumerator(CustomLinkedList <T> list) { _list = list; }
/// <summary> /// Default constructor /// </summary> public CustomQueue() { _list = new CustomLinkedList <T>(); }