How can I check at runtime whether a C# application is a Windows application or a console application?
I want to write a generic output library (output to textbox or console when console app).
For that reason, if I could check whether it is a asp application would be useful, too.