Discovering your C# compiler version
The .NET language compiler for C# and Visual Basic, also known as Roslyn, along with a separate compiler for F#, is distributed as part of the .NET SDK. To use a specific version of C#, you must have at least that version of the .NET SDK installed, as shown in Table 2.2:
.NET SDK |
Roslyn compiler |
Default C# language |
1.0.4 |
2.0–2.2 |
7.0 |
1.1.4 |
2.3–2.4 |
7.1 |
2.1.2 |
2.6–2.7 |
7.2 |
2.1.200 |
... |