Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to prevent method call during dev mode?
Message
From
28/08/2007 09:57:23
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
28/08/2007 04:49:58
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01250851
Message ID:
01250898
Views:
12
Hi John,

Can you check for Debugger.IsAttached? I do this for some things and it works pretty good.
if(System.Diagnostics.Debugger.IsAttached)
{
     this.btnFullScreen.Visible = true;
}
else
{
     this.btnFullScreen.Visible = false;
}
>Hi,
>I have code to call my method in class constructor. I want to prevent it to be called during development mode. I added code to check for DesignMode before execute the actual code.
>
>However, I found that, designmode return wrong value. It return false during dev mode (using messagebox).
>

Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform