public static void Main(){ myOwnCOllection Student = new myOwnCOllection(); student s1 = new student(){Sid=110, Name="mahbub",Class=11, Marks=10.99f}; student s2 = new student(){Sid=105, Name="ahmed",Class=12, Marks=30.99f}; student s3 = new student(){Sid=103, Name="tonmoy",Class=13, Marks=20.99f}; student s4 = new student(){Sid=101, Name="tonni",Class=14, Marks=610.99f}; student s5 = new student(){Sid=102, Name="tonmoy",Class=13, Marks=220.99f}; student s6 = new student(){Sid=107, Name="tonni",Class=14, Marks=160.99f}; student s7 = new student(){Sid=108, Name="tonmoy",Class=13, Marks=210.99f}; student s8 = new student(){Sid=111, Name="tonni",Class=14, Marks=10.59f}; Student.Add(s1); Student.Add(s2); Student.Add(s3); Student.Add(s4); Student.Add(s5); Student.Add(s6); Student.Add(s7); Student.Add(s8); foreach(student i in Student){ Console.WriteLine(i.Name+" "+i.Marks+" "+i.Sid); } }
public Enumerator(myOwnCOllection mC){ myOwnC = mC; CurrentIndex = -1; }