Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            SampleClass sampleObject = new SampleClass();

            sampleObject[0] = "Sample";
            sampleObject[1] = "Iterator";
            sampleObject[2] = "Class";

            Iterator classIterator = sampleObject.GetIterator();

            while (classIterator.HasNext())
            {
                Console.WriteLine(classIterator.Next());
            }
        }
Ejemplo n.º 2
0
 public SampleClassIterator(SampleClass classObject)
 {
     this.classObject = classObject;
     objectSize       = this.classObject.Size();
 }