K
K
kill942015-09-24 00:41:02
C++ / C#
kill94, 2015-09-24 00:41:02

How to read the character of the pressed key?

How to read the character of the pressed key? there is a ReadKey method, but it waits for a press

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sanan Yuzb, 2015-09-24
@Sanan07

char c = Console.ReadKey().KeyChar;

S
Stanislav Makarov, 2015-09-24
@Nipheris

Console.KeyAvailable

A
Anton Fedoryan, 2015-09-24
@AnnTHony

There was already such a question .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question