static void Menu(Order cart) { var exit = false; do { Starter.PrintMenu(); int select; int.TryParse(Console.ReadLine(), out select); switch (select) { case 1: cart.CreatePizza("L", "Stuffed", new List <string> { "cheese" }); System.Console.WriteLine("added Cheese"); break; case 2: cart.CreatePizza("L", "Stuffed", new List <string> { "pepperoni" }); System.Console.WriteLine("added Pepperoni"); break; case 3: cart.CreatePizza("L", "Stuffed", new List <string> { "meat lovers" }); System.Console.WriteLine("added Meatlovers"); break; case 4: cart.CreatePizza("L", "Stuffed", new List <string> { "custom" }); System.Console.WriteLine("added Custom"); break; case 5: DisplayCart(cart); break; case 6: var fmw = new FileManager(); fmw.Write(cart); System.Console.WriteLine("thank you, goodbye!"); exit = true; break; case 7: var fmr = new FileManager(); DisplayCart(fmr.Read()); break; } System.Console.WriteLine(); } while (!exit); }