console class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DaveP

    #1

    console class

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


  • Peter Duniho

    #2
    Re: console class

    DaveP wrote:
    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.KeyAvai lable property to tell you
    whether ReadKey() will return immediately.

    Pete

    Comment

    Working...