Beispiel #1
0
        public void AddAfter(DLinkedListNode node, DLinkedListNode target)
        {
            if (Tail == target)
            {
                target.Next   = node;
                node.Previous = target;

                Tail = node;
            }
            else
            {
                DLinkedListNode oldNext = target.Next;

                node.Previous = target;
                node.Next     = oldNext;

                oldNext.Previous = node;
                target.Next      = node;
            }
        }
Beispiel #2
0
 public DLinkedList(DLinkedListNode node)
 {
     Head = node;
     Tail = node;
 }