Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");


            Iterator    iterator;
            ITroopQueue list = new ConcreteTroopQueue();

            iterator = list.GetIterator();

            while (iterator.MoveNext())
            {
                string ren = (string)iterator.GetCurrent();
                Console.WriteLine(ren);
                iterator.Next();
            }

            Console.Read();
        }
Пример #2
0
 public ConcreteIterator(ConcreteTroopQueue list)
 {
     _list  = list;
     _index = 0;
 }