public static void Main(string[] args) { int menu; do { Menu(); string input; input = Console.ReadLine(); if (Int32.TryParse(input, out menu)) { switch (menu) { case 1: Console.WriteLine("--- Adding Artist ---"); AddArtist(); break; case 2: Console.WriteLine("--- Adding Curator ---"); AddCurator(); break; case 3: Console.WriteLine("--- Adding Art Piece ---"); AddArtpiece(); break; case 4: Console.WriteLine("--- Selling Art Piece ---"); SellArtPiece(); curatorInstance.ClearComm(); eventInstance.Detach(); break; case 5: Console.WriteLine("--- List Artists ---"); ListArtists(); break; case 6: Console.WriteLine("--- List Curators ---"); ListCurators(); break; case 7: Console.WriteLine("--- List Pieces ---"); ListPieces(); break; case 9: Console.WriteLine("Quiting application..."); break; default: Console.WriteLine("Choose a number between 1 to 9"); break; } } else { Console.WriteLine("Enter integer not words"); } } while (menu != 9); }