Пример #1
0
 public void Delete_First_Node()
 {
     if(first!=last) {
         Node temp = first;
         first = first.next;
         first.previous = null;
         temp.Dispose();
         length--;
     }
 }
Пример #2
0
 public void Add_Node(int number)
 {
     if(last == null)
     {
         Node nd = new Node(number);
         last = nd;
         last.next = null;
         last.previous = null;
         first = last;
     }
     else
     {
         Node nd = new Node(number);
         last.next = nd;
         nd.previous = last;
         nd.next = null;
         last = nd;
     }
     length++;
 }
Пример #3
0
 public Node(int number)
 {
     value = number;
     previous = null;
     next = null;
 }