Click or drag to resize

LanguageVersion Class



Specifies the language version.
Inheritance Hierarchy
SystemEnum
  Microsoft.CodeAnalysis.CSharpLanguageVersion

Namespace:  Microsoft.CodeAnalysis.CSharp
Assembly:  Microsoft.CodeAnalysis.CSharp (in Microsoft.CodeAnalysis.CSharp.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public sealed class LanguageVersion : Enum

The LanguageVersion type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberCSharp1
C# language version 1.0.
Public fieldStatic memberCSharp2
C# language version 2.0.
Public fieldStatic memberCSharp3
C# language version 3.0.
Public fieldStatic memberCSharp4
C# language version 4.0.
Public fieldStatic memberCSharp5
C# language version 5.0.
Public fieldStatic memberCSharp6
C# language version 6.0.
Public fieldStatic memberCSharp7
C# language version 7.
Public fieldStatic memberCSharp7_1
C# language version 7.1
Public fieldStatic memberDefault
The default language version, which is the latest major supported version.
Public fieldStatic memberLatest
The latest version of the language supported.
Public fieldvalue__
Top
Extension Methods
  NameDescription
Public Extension MethodMapSpecifiedToEffectiveVersion
Map a language version (such as Default, Latest, or CSharpN) to a specific version (CSharpM).
(Defined by LanguageVersionFacts.)
Public Extension MethodToDisplayString
Displays the version number in the format expected on the command-line (/langver flag). For instance, "6", "7", "7.1", "latest".
(Defined by LanguageVersionFacts.)
Top
See Also