public bool MoveNext() { if (current.NextNode == null) { return(false); } current = current.NextNode; return(true); }
public void Reset() => current = new CustomListNode <T> { NextNode = rootNode };
public CustomIterator(CustomList <T> list, CustomListNode <T> rootNode) { this.list = list; this.rootNode = rootNode; Reset(); }