Пример #1
0
 public void PopEnd()
 {
     if (_last == null)
     {
         return;
     }
     if (_last != null)
     {
         if (Length == 1)
         {
             _front = _last = null;
             _length--;
         }
         else
         {
             _last      = _last.Previous;
             _last.Next = null;
             _length--;
         }
     }
 }
Пример #2
0
 public DoublyLinkedList()
 {
     _front  = null;
     _last   = null;
     _length = 0;
 }
Пример #3
0
 private void Init(T value)
 {
     _front = _last = new DoublyLinkedListNode <T>(value);
 }