// switch with string type switch (myInput) { case "continue": Console.WriteLine("Hello"); break; case "quit": Console.WriteLine("Bye."); break; default: Console.WriteLine("Your input {0} is incorrect.", myInput); break; }