Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Program
- {
- public static void Main()
- {
- while (true) {
- ConsoleKey key = Console.ReadKey(true).Key;
- Console.WriteLine("You hit the {0} key. \n", key);
- if (key.Equals(ConsoleKey.Enter)) {
- break; }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement