What Is Conditional Compiling?
Conditional compiling is a very basic concept that enables you to do some pretty powerful things. Basically, conditional compiling enables you to compile parts of your code based on a certain condition defined at compile time. Generally, this is used if you have a debugging function that you do not want to include in your release build. Or, you might have a function that you want two versions of: one for your debugging and one for a release. The debug version might be littered with output statements or other code that would be too slow to execute in a release environment. With conditional compiling, you could create two versions of the function and flip the switch on which one should be compiled in your program, ...
Get Debugging ASP.NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.