Compiler Options

The C# compiler, csc.exe, is used to compile C# code. Only compiled code can be executed. The compiler can be called from the command line as well as from VS .NET. You learned to compile code using these two methods in previous chapters.

→ To learn more about compiling a C# program, seeCompiling and Executing a C# Program,” p. 73

The behavior of the compiler can be modified or specified using compiler options or switches. Table D.1 lists the various options that can be specified during the compilation of a program.

Table D.1. The Different Compiler Options and Their Description with Examples
Option Description Example
@ Specifies a response file, which consists of all the compiler options and the source code files that must ...

Get Special Edition Using C# 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.