using System.Collections.Generic;
public static void Main()
IList<int> intList = new List<int>();
IList<string> strList = new List<string>();
IList<Student> myStudentList = new List<Student>();
myStudentList.Add(new Student("James", 1));
myStudentList.Add(new Student("John", 2));
myStudentList.Add(new Student("Luke", 3));
myStudentList.Add(new Student("Matthew", 4));
myStudentList.Add(new Student("Mark", 5));
IList<Student> myDetentionList = new List<Student>(){
List<string> booksBible = new List<string>(){
Console.WriteLine("Iterate List<T>");
booksBible.ForEach(li => Console.WriteLine(li));
Console.WriteLine("{0}Iterate IList<T>",System.Environment.NewLine);
foreach (var li in myStudentList) Console.WriteLine("Student {0} {1}", li.ID, li.Name );
IList<int> intListQuick = new List<int>() { 10, 20, 30, 40 };
public Student(string name, int id){