How do I flush the keyboard buffer in C# using Windows Forms?
I have a barcode scanner which acts like a keyboard. If a really long barcode is scanned and the cancel
while (Console.KeyAvailable) { Console.ReadKey(true); }