jrliv
5/19/2017 - 11:11 AM

Example using the Console.ReadKey(). From Fundamentals of Computer Programming with C# http://www.introprogramming.info/wp-content/uploads/2

ConsoleKeyInfo key = Console.ReadKey();

Console.WriteLine();
Console.WriteLine("Character entered: " + key.KeyChar);
Console.WriteLine("Special keys: " + key.Modifiers);

// J
// Character entered: J
// Special keys: Shift