static void Main(string[] args) { bool exit = false; while (!exit) { Console.WriteLine("Hello, Please Select Option"); Console.WriteLine("a. Category"); Console.WriteLine("b. Product"); Console.WriteLine("c. Exit App!"); char ch = Convert.ToChar(Console.ReadLine()); switch (ch) { case 'a': CategoryOperation.CategoryOperationMenu(); break; case 'b': ProductOperation.ProductOperationMenu(); break; case 'c': Console.WriteLine("Exit"); exit = true; break; default: Console.WriteLine("Invalid Selection"); break; } Console.Clear(); } }
static void Main(string[] args) { Console.WriteLine("Please Select one the Options"); Console.WriteLine("1. Category"); Console.WriteLine("2. Product"); Console.WriteLine("3. Exit The App!"); char ch = Convert.ToChar(Console.ReadLine()); switch (ch) { case '1': CategoryOperation.CategoryOperationMenu(); break; case '2': ProductOperation.ProductOperationMenu(); break; case '3': return; default: Console.WriteLine("Invalid option Selected"); break; } }