Beispiel #1
0
        public static void Run()
        {
            var collection = new EnumerableCollection();

            collection.Add("Edison");
            collection.Add("Russel");
            var iterator = collection.GetIterator();

            for (var item = iterator.GetFirst(); !iterator.IsDone; item = iterator.GetNext())
            {
                Console.WriteLine(item);
            }
        }
Beispiel #2
0
 public CollectionIterator(EnumerableCollection collection)
 {
     _collection = collection;
 }