#if DEBUG vs if (env.IsDevelopment())
Preprocessor directives are conditionally compiled… Which means that something like this: #if DEBUG //Do something #endif Will only be compiled and checked if the DEBUG symbol is defined (it is defined when the build is set to DEBUG). Additionally, in the IDE the code between the preprocessor symbols will appear greyed out. This code: if … Read more