static void Main(string[] args) { PracticeList<string> myList = new PracticeList<string>(); myList.add("Bonjour"); myList.add("Simon"); myList.add("bonne journée"); for(int index = 0; index < 3; index++){ Console.WriteLine(myList.get(index)); } Console.ReadKey(); }
static void Main(string[] args) { PracticeList <int> list = new PracticeList <int>(); list.Add(1); list.Add(2); list.Add(3); Console.WriteLine($"The third item is {list.GetItem(2)}"); PracticeList <string> listString = new PracticeList <string>(); listString.Add("Hello"); listString.Add("World"); listString.Add("!"); Console.WriteLine($"The third item is {listString.GetItem(2)}"); }