// Display the main menu for the user. public void DisplayMainMenu(CSVProcessor WineFile, List <WineItem> wineList) { bool quitMainBoolean = false; // do while loop keeps showing the menu do { Console.WriteLine("Select an option: \n \n 1. Load the csv file of wine list. 2. Exit program."); string optionSelection = Console.ReadLine(); if (optionSelection == "1") { quitMainBoolean = true; WineFile.ReadCSV(wineList); } else if (optionSelection == "2") { Environment.Exit(0); } } while (quitMainBoolean != true); }
// Display the main menu for the user. public void DisplayMainMenu(CSVProcessor WineFile, List<WineItem> wineList) { bool quitMainBoolean = false; // do while loop keeps showing the menu do { Console.WriteLine("Select an option: \n \n 1. Load the csv file of wine list. 2. Exit program."); string optionSelection = Console.ReadLine(); if (optionSelection == "1") { quitMainBoolean = true; WineFile.ReadCSV(wineList); } else if (optionSelection == "2") { Environment.Exit(0); } } while (quitMainBoolean != true); }