private void DoRemove(DoubleLinkedListNode <T> node) { if (node == Head) { node.Dispose(); Head = null; } else { var prev = node.Previous; var next = node.Next as DoubleLinkedListNode <T>; prev.Next = next; next.Previous = prev; } Count--; }
public void AddLast(T data) { var node = new DoubleLinkedListNode <T>(data); AddLast(node); }