Example #1
0
        internal void CreateItemAtBeginnning(int item)
        {
            DoubleNode temp = new DoubleNode(item);

            if (start == null)
            {
                start = temp;
                return;
            }

            temp.next  = start;
            start.prev = temp;
            start      = temp;

            return;
        }
Example #2
0
        internal void CreateItemAtEnd(int item)
        {
            DoubleNode temp = new DoubleNode(item);

            if (start == null)
            {
                start = temp;
                return;
            }
            p = start;
            while (p.next != null)
            {
                p = p.next;
            }
            p.next    = temp;
            temp.prev = p;
        }
Example #3
0
 public DoubleLinkList()
 {
     start = null;
 }
Example #4
0
 public DoubleNode(object i)
 {
     data = i;
     prev = null;
     next = null;
 }