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 compiled in debug mode? The code I want to surround with this block sends out a bunch of emails, and I don't want to accidentally send those out when testing.
C# – Will #if RELEASE work like #if DEBUG does in C#
cdebuggingnet
Related Topic
- C# – How to remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning
- C# – Debug vs. Release performance
- Android – Run/install/debug Android applications over Wi-Fi
- C# – reason for C#’s reuse of the variable in a foreach
- C# – Try-catch speeding up the code
- Ios – How to determine whether code is running in DEBUG / RELEASE build
- Php – Reference – What does this error mean in PHP
- Scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found
Best Answer
RELEASE
is not defined, but you can use