A sample iteration of the three instance variable collection. | Lecture 12 - slide 35 : 36 Program 2 |
using System; class Client{ public static void Main(){ GivenCollection<int> gc = new GivenCollection<int>(7,5,3); Console.WriteLine("Number of elements in givenCollection: {0}", gc.Count()); foreach(int i in gc){ // Output: 7 5 3 Console.WriteLine(i); } } } |