C# Preprocessor Directives

Preprocessor directives are inserted into source code files but are not compiled into the final product. They provide instructions to the compiler or tell Visual Studio how to format code in the integrated development environment.

Reference Sheet

This reference sheet lists all of the preprocessor directives that can be used with C# source code when developing console applications or Windows-based software. The preprocessor directives are grouped according to their purpose. Each includes one or more examples of its usage and notes about its effects and limitations.