Exemplo n.º 1
0
        static void Main(string[] args)
        {
            ITerator        terator;
            IListCollection list = new ConcreteList();

            terator = list.GetIterator();

            while (terator.MoveNext())
            {
                int i = (int)terator.GetCurrent();
                Console.WriteLine(i.ToString());
                terator.Next();
            }

            Console.Read();
        }
Exemplo n.º 2
0
 public ConcreteIterator(ConcreteList list)
 {
     _list  = list;
     _index = 0;
 }