dvplayltd
asked on
I need IsIDE function in C#
Hi experts!
I created WinForm application with C# 2008. Will be very helpful to create boolean function IsIDE which tell me when Im starting the program within IDE, and when I start program from .exe file. Can somebody help ?
I created WinForm application with C# 2008. Will be very helpful to create boolean function IsIDE which tell me when Im starting the program within IDE, and when I start program from .exe file. Can somebody help ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
check this...
bool IsIDE = System.Diagnostics.Debugger.IsAttached;
if (IsIDE)
{
MessageBox.Show("IDE");
}
else
{
MessageBox.Show("EXE");
}
http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.isattached.aspx