In all the examples I\'ve seen of the #if compiler directive, they use \"DEBUG\". Can I use \"RELEASE\" in the same way to exclude code that I don\'t want to run when compi
You can create you own conditional compile-time symbols (any name you like). Go to the "project Build dialog", located in the project properties box, menu option: Project->[projectname] Properties...
You can also define them "at the top of the C# code file". Like:
#define RELEASE
// or
#undef RELEASE
you can use the symbol in a #if statement:
#if RELEASE
// code ...
#elif …
// code ...
#endif
// or
#if !RELEASE
// code ...
#endif