コード例 #1
0
ファイル: CustomIterator.cs プロジェクト: AndrewTheM/OOP
        public bool MoveNext()
        {
            if (current.NextNode == null)
            {
                return(false);
            }

            current = current.NextNode;
            return(true);
        }
コード例 #2
0
ファイル: CustomIterator.cs プロジェクト: AndrewTheM/OOP
 public void Reset()
 => current = new CustomListNode <T>
 {
     NextNode = rootNode
 };
コード例 #3
0
ファイル: CustomIterator.cs プロジェクト: AndrewTheM/OOP
 public CustomIterator(CustomList <T> list, CustomListNode <T> rootNode)
 {
     this.list     = list;
     this.rootNode = rootNode;
     Reset();
 }