Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional Compilation
Message
From
12/01/2009 17:29:14
 
 
To
12/01/2009 16:49:53
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01372770
Message ID:
01372994
Views:
26
>>>You can also test for debug mode
>>>
>>>if (System.Diagnostics.Debugger.IsAttached)
>>>{
>>>     DoSomething()
>>>}
>>>else
>>>{
>>>     DoSomethingElse()
>>>}
>>>
>>
>>I didn't know that. But now that I do I'm having trouble seeing a use for it.....

>
>
>I use that occasionally for error messages. IOW, an error message that gets displayed to the user at runtime might be an abbreviated version of the error message displayed to the developer during debugging.

OK. But conditional compilation can do that. Using this it feels that I would be compiling/shipping surplus production code. i.e. if you're going to be around to debug it then why not just run a debug version.......
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform