Preprocessor Directives
Preprocessor directives are instructions to the C# compiler to perform some action during compilation. There is no equivalent functionality in Java. The term preprocessor directive is misleading because the compilation process does not include a preprocessing step, but the term is a legacy of C/C++ and has remained to avoid confusion.
Preprocessor directives are used to
Conditionally include and exclude sections of code during compilation.
Force the compiler to issue warnings and errors.
Group related sections of source code.
Alter the line number and file-name references displayed by the compiler for errors and warnings.
Preprocessor directives are preceded by the # symbol and must be the only command on a line. They are not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access