private static void Main(string[] args) { //UseCircularIntList(); CircularList <String> list = new CircularList <String>(); list.Add("Ebbe"); list.Add("Liv"); list.Add("Mik"); Console.WriteLine(list.Current()); list.Next(); Console.WriteLine(list.Current()); list.Next(); Console.WriteLine(list.Current()); list.Next(); Console.WriteLine(list.Current()); list.Next(); Console.WriteLine("=== Testing foreach ==="); foreach (var s in list) { Console.WriteLine(s); } }
public IteratorT(CircularList <T> circularList) { _circularList = circularList; _itemsLeft = _circularList.Count(); }