In C#/VB
in Visual Studio 2010
, is there way in the code to determine whether the program is currently running in the IDE or not?
eg. If ProgramRunningInIDE Then MessageBox.Show exc.Message
You could check if the debugger is attached with:
System.Diagnostics.Debugger.IsAttached
This essentially does the same thing.