public void Add(T value) { if (Empty) { _head = _tail = new DoubleLinkedListNode <T>(value, null, null); } else { _tail = new DoubleLinkedListNode <T>(value, _tail, null); _tail.Prev.Next = _tail; } _count++; }
public DoubleLinkedListNode(T value, DoubleLinkedListNode <T> prev = null, DoubleLinkedListNode <T> next = null) { Value = value; Prev = prev; Next = next; }