Liu
Liu
CC#
Created by Liu on 6/13/2023 in #help
❔ How do I make it so when the player makes an incorrect key input, it lets them make another input
if (keyInfo.Key == ConsoleKey.D1) { Console.WriteLine("This is a test!"); } else if (keyInfo.Key == ConsoleKey.D2) { Console.WriteLine("This is also a test!"); } else if (keyInfo.Key == ConsoleKey.D3) { Console.WriteLine(); } else if (keyInfo.Key == ConsoleKey.D4) { Console.WriteLine(); } else { Console.WriteLine("Please press the correct key."); } Console.ReadLine();
3 replies