public void Clear() { NCLinkedListNode <T> head = this.head; while (head != null) { NCLinkedListNode <T> node2 = head; head = head.Next; node2.Invalidate(); } this.head = null; this.count = 0; }
internal void InternalRemoveNode(NCLinkedListNode <T> node) { if (node.next == node) { this.head = null; } else { node.next.prev = node.prev; node.prev.next = node.next; if (this.head == node) { this.head = node.next; } } node.Invalidate(); this.count--; }