static void Main1(string[] args) { IMyList myList = new MyList(); string a; do { a = Console.ReadLine(); int b = int.Parse(Console.ReadLine()); switch (a) { case "a": myList.Add(b); break; case "g": Console.WriteLine(myList.Get(b)); break; } } while (a!= "q"); }