Preprocessor directives in Razor
I am writing my first Razor page today, and can’t figure out how to enter #if debug … #else … #endif How can … Read more
I am writing my first Razor page today, and can’t figure out how to enter #if debug … #else … #endif How can … Read more
I am making an app that processes sensitive credit card data. If my code is running in debug mode I want to log … Read more
Which is better to use, and why, on a large project: #if DEBUG public void SetPrivateValue(int value) { … } #endif or [System.Diagnostics.Conditional(“DEBUG”)] … Read more
In C/C++/Objective C you can define a macro using compiler preprocessors. Moreover, you can include/exclude some parts of code using compiler preprocessors. #ifdef … Read more