Check in Code if in Debug or Release mode
Posted on: Fri Apr 30 11:28:22 -0700 2010. Updated on: Fri Apr 30 11:31:18 -0700 2010.
Category: DotNet
Category: DotNet
In c sharp it is easy to check if the code being executed is currently being run in debug or release mode:
#if DEBUG // code goes in here #else // other optional code #endif // dont forget this!
You can also use the RELEASE keyword to check if you are in release build mode.