public void Delete_First_Node() { if(first!=last) { Node temp = first; first = first.next; first.previous = null; temp.Dispose(); length--; } }
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++; }
public Node(int number) { value = number; previous = null; next = null; }