C# ReadKey crashing console app when called using <nul
问题 So I decided to start programming in C#, and one of the things I did was to create a "pausec.exe" (a pause.exe clone). It works, but when calling it like: < nul pausec ...it crashes. The error I get - translated from Spanish to the best of my knowledge - goes like this: Unhandled exception: System.InvalidOperationException: Can't read keys when any of the applications doesn't have a console or when the console input has been redirected from a file. Try with Console.Read. And the stacktrace