/// <summary> /// Removes all values in the Skip List /// </summary> public virtual void Clear() { SkipListNode <T> currentNode = this.Head; while (currentNode != null) { SkipListNode <T> nextNode = currentNode.Next; //save reference to next node if (!currentNode.IsHeader() && !currentNode.IsFooter()) { this.Remove(currentNode); } currentNode = nextNode; } }
public bool MoveNext() { if (current == null) { current = this.skipList.Head.Next; //Head is header node, start after } else { current = current.Next; } if (current != null && current.IsFooter()) { current = null; //end of list } return(current != null); }