public void AddLast(T value) { var newNode = new DoubleLinkedListNode <T>(value); if (_head == null) { _head = newNode; return; } var n = _head; while (n.Next != null) { n = n.Next; } newNode.Prev = n; n.Next = newNode; }
public void AddLast(T value) { var newNode = new DoubleLinkedListNode <T>(value); if (_head == null) { _head = newNode; return; } var n = _head; while (n.Next != null) { n = n.Next; } newNode.Prev = n; n.Next = newNode; }