The C# preprocessor, although much less powerful than the C or C++ preprocessors, still provides the ability to enable or disable lines of code based on project-level flags. In addition, when combined with external PowerShell scripts, the C# preprocessor can be used to automatically spin custom C# solutions with subsets of the target code. This can be particularly useful when providing two versions of the source code, for instance a 32-bit and 64-bit version, or when creating custom source code adaptations for different applications.
Continue reading