static void Main(string[] args) { var list = new LinkedListofNode(); list.Add(5); list.Add(3); list.Add(4); list.Add(5); list.Add(6); list.Add(9); foreach (var item in list) { Console.WriteLine(item.data); } }
/// <summary> /// ctor thet takes the list that must be enumerated as a parametr /// </summary> /// <param name="list"></param> public LinkedListEnumerator(LinkedListofNode list) { this.lst = list; }