Configuration Manager in .NET

A

astroboy

Is there anyway to detect whether the .NET Application is Run in "Release"
or "Debug" mode of Configuration Manager(Active Solution Configuration) by
coding ???
 
M

Mike Smith

u can try the Conditional attribute that u place before a method ...
check it out in the SDK docs
 
H

Herfried K. Wagner [MVP]

* "astroboy said:
Is there anyway to detect whether the .NET Application is Run in "Release"
or "Debug" mode of Configuration Manager(Active Solution Configuration) by
coding ???

Mhm... You can find out if a debugger is attached using
'System.Diagnostics.Debugger.IsAttached', in order to determine if you
are running in debug mode, you can use '#If Debug Then...' (maybe you
will have to check a checkbox in the IDE settings to define the 'DEBUG'
constant).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top