Possible Duplicate:
How can I determine the subsystem used by a given .NET assembly?
In my solution I have a generic error reporting library. In my programs in that solution I simply use it like:
AppDomain.CurrentDomain.UnhandledException += ErrorReporter.HandleUnhandledException;
Now I want to be able to react differently in HandleUnhandledException
based on if it was called by a WinForms or a Console application.