Best way to detect a release build from a debug build? .net

Specifically, like this in C#:

#if (DEBUG)
   Debug Stuff
#endif

C# has the following preprocessor directives:

#if 
#else 
#elif // Else If
#endif
#define
#undef // Undefine
#warning // Causes the preprocessor to fire warning
#error // Causes the preprocessor to fire a fatal error
#line // Lets the preprocessor know where this source line came from
#region // Codefolding
#endregion 

Leave a Comment