How To Detect a DEBUG run (in C#)?

  • Thread starter Thread starter Harald
  • Start date Start date
H

Harald

Hi,
I need to perform some Operations in DEBUG-Builds (C# Windows-Forms
application). How can I detect a DEBUG-Configuration and perform actions as
with the C++ directives

#ifdef _DEBUG
....
#else
....
#endif

Thanks for any hint!
Harald
 
Hello, Harald!

H> #ifdef _DEBUG
H> ...
H> #else
H> ...
H> #endif

In the same way as with C++ only instead _DEBUG use DEBUG
#if DEBUG
//do debug
#else
//do release
#endif

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Back
Top