I am trying to get my menu to repeat, so after selecting and doing option 1, it will got back to the menu and ask for another option to be chosen
class Progr
See: http://msdn.microsoft.com/en-us/library/471w8d85(v=vs.110).aspx
Replace your main function with:
static void Main(string[] args) {
FootballTeams MyCode = new FootballTeams();
MyCode.ListInit();
ConsoleKeyInfo cki;
do {
MyCode.DisplayMenu();
cki = Console.ReadKey(false); // show the key as you read it
switch (cki.KeyChar.ToString()) {
case "1":
MyCode.AddTeams();
break;
case "2":
MyCode.DisplayTeams();
break;
// etc..
}
} while (cki.Key != ConsoleKey.Escape);
}
Essentially, you need to loop until they press the Escape key. Each time you read the key you can execute the action selected.