/langversion (C# Compiler Options)
Causes the compiler to accept only syntax that is included in the chosen C# language specification.
/langversion:option
Metadata referenced by your C# application is not subject to /langversion compiler option.
Because each version of the C# compiler contains extensions to the language specification, /langversion does not give you the equivalent functionality of an earlier version of the compiler.
Regardless of which /langversion setting you use, you will use the current version of the common language runtime to create your .exe or .dll. One exception is friend assemblies and /moduleassemblyname (C# Compiler Option), which work under /langversion:ISO-1.
To set this compiler option in the Visual Studio development environment
Open the project's Properties page.
Click the Build property page.
Click the Advanced button.
Modify the Language Version property.
For information about how to set this compiler option programmatically, see LanguageVersion.