Example #1
0
        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++;
        }
Example #2
0
 public DoubleLinkedListNode(T value, DoubleLinkedListNode <T> prev = null, DoubleLinkedListNode <T> next = null)
 {
     Value = value;
     Prev  = prev;
     Next  = next;
 }