console class


D

DaveP

is there a method of console class where i can
be in a loop and just read keys pressed
example
while true
{
somekey=somemethod() // does not wait for enter key just continues
if (somekey==somevalue)
{
break;
}
}
 
Ad

Advertisements

P

Peter Duniho

DaveP said:
is there a method of console class where i can
be in a loop and just read keys pressed
No, but you can check the Console.KeyAvailable property to tell you
whether ReadKey() will return immediately.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top