Example #1
0
 public void RemoveFirst()
 {
     if (count == 0)
     {
         return;
     }
     else if (count == 1)
     {
         Head = null;
         Tail = null;
     }
     else
     {
         Head      = Head.Next;
         Head.Prev = null;
     }
     count--;
 }
Example #2
0
 public void RemoveLast()
 {
     if (count == 0)
     {
         return;
     }
     else if (count == 1)
     {
         Head = null;
         Tail = null;
     }
     else
     {
         Tail.Prev.Next = null;
         Tail           = Tail.Prev;
     }
     count--;
 }