public static void Main(string[] args) { TakimconCreteAggregate TakimCollection = new TakimconCreteAggregate(); TakimCollection.Add(new Takim { TakimAdi = "Şalvar spor", Puan = 55 }); TakimCollection.Add(new Takim { TakimAdi = "Real Madrid", Puan = 9 }); TakimCollection.Add(new Takim { TakimAdi = "Barcelona", Puan = 10 }); ITakimIterator itr = TakimCollection.GetIterator(); while (itr.IsDone()) { Console.WriteLine("{0}:{1}", itr.CurrentItem().TakimAdi, itr.CurrentItem().Puan); itr.Next(); } Console.ReadKey(); }
public TakimConcreteIterator(TakimconCreteAggregate ColTakim) { this.CollectionTakim = ColTakim; }