Console application freezes on mouse click
问题 I have a very simple C# console application that displays some text and loops waiting for input until the escape key is pressed or the timeout period is served. using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; namespace SampleApp { public static class Program { public static void Main (string [] args) { var key = new ConsoleKeyInfo(); var watch = Stopwatch.StartNew(); var timeout = TimeSpan.FromSeconds(5);