0

I'm currently attempting to make a snake clone in VB2015 using the console template. I'm wondering if I can disable the ability to type so I can finish it. Thank you.

madkaratemans
  • 67
  • 1
  • 7

1 Answers1

-1

Taken from Hans Passant's answer here:

while (!Done)
{
    while (Console.KeyAvailable) Console.ReadKey(true);
    ConsoleKeyInfo key = Console.ReadKey(true);
    // etc..
}
Community
  • 1
  • 1
cramopy
  • 3,459
  • 6
  • 28
  • 42
  • Why did you copy [the answer](http://stackoverflow.com/a/5147535/4275342) insted of mark it as dublicate? If this question is a duplicate of the question you've linked here, please flag it as a duplicate with the "flag" button under the question instead of leaving an answer to that effect. If it is not a duplicate, then please leave a complete answer instead of a link-only answer – Roman Marusyk Feb 08 '16 at 20:20