public DuplexLinkedList(T data) { var item = new DuplexItem <T>(data); Head = item; Tail = item; Count = 1; }
public void Add(T data) { var item = new DuplexItem <T>(data); if (Count == 0) { Head = item; Tail = item; Count = 1; return; } Tail.Next = item; item.Previous = Tail; Tail = item; Count++; }