How can a C# Windows Console application tell if it is run interactively
[EDIT: 4/2021 – new answer…] Due to a recent change in the Visual Studio debugger, my original answer stopped working correctly when debugging. To remedy this, I’m providing an entirely different approach. The text of the original answer is included at the bottom. 1. Just the code, please… To determine if a .NET application is … Read more