Logo

What are the correct version numbers for C#?

Below is a concise breakdown of the main C# language versions, their corresponding .NET (or .NET Core) frameworks, and Visual Studio releases. While the language versioning can get a bit nuanced with minor updates (like 7.1, 7.2, 7.3, etc.), these major milestones give you a clear picture of the “correct” version numbers for C# over time.

C# 1.0 and 1.2

  • .NET Framework: 1.0 and 1.1
  • Visual Studio: .NET 2002 (for 1.0), .NET 2003 (for 1.2)
  • Key Features: Basic language constructs, first official release of C#.

C# 2.0

  • .NET Framework: 2.0
  • Visual Studio: 2005
  • Key Features: Generics, partial types, anonymous methods, nullable types.

C# 3.0

  • .NET Framework: 3.5
  • Visual Studio: 2008
  • Key Features: LINQ, lambda expressions, extension methods, object initializers.

C# 4.0

  • .NET Framework: 4.0
  • Visual Studio: 2010
  • Key Features: Dynamic binding (dynamic keyword), named/optional parameters, COM interop improvements.

C# 5.0

  • .NET Framework: 4.5
  • Visual Studio: 2012
  • Key Features: Async/await, caller info attributes, improved async programming model.

C# 6.0

  • .NET Framework: 4.6
  • Visual Studio: 2015
  • Key Features: Expression-bodied functions, auto-property initializers, string interpolation, nameof operator.

C# 7.0 (and 7.x)

  • .NET Framework / .NET Core: 4.7+ / .NET Core 1.x+
  • Visual Studio: 2017
  • Key Features (7.0): Tuples, pattern matching, local functions, ref returns.
  • Key Features (7.1, 7.2, 7.3): Minor enhancements to pattern matching, default literals, in parameters, ref struct improvements.

C# 8.0

  • .NET Core: 3.x (recommended)
  • Visual Studio: 2019
  • Key Features: Nullable reference types, async streams, default interface methods, indices and ranges.

C# 9.0

  • .NET: 5
  • Visual Studio: 2019 (16.8+)
  • Key Features: Record types, init-only setters, improved pattern matching, top-level statements.

C# 10.0

  • .NET: 6 (LTS)
  • Visual Studio: 2022
  • Key Features: Global using directives, file-scoped namespaces, improved lambda expressions, record structs.

C# 11.0

  • .NET: 7
  • Visual Studio: 2022 (17.3+)
  • Key Features: Raw string literals, generic math support, required members, enhanced pattern matching.

C# 12.0 (Planned)

  • .NET: 8
  • Visual Studio: 2022 (17.8+) or later
  • Key Features: Ongoing previews include primary constructors for classes/structs, more pattern matching enhancements, and additional quality-of-life improvements.

Note: Microsoft continues to release minor updates (like 7.1, 7.2, 7.3) that refine existing features rather than introducing major new ones. Always check official documentation or your .csproj file’s <LangVersion> setting to confirm the exact C# version you’re targeting.

Strengthen Your C# and Coding Skills

If you’re eager to polish your coding fundamentals and excel in technical interviews (where knowledge of language features matters), consider these hands-on, pattern-based courses:

These resources at DesignGurus.io focus on building a strong problem-solving mindset and a deep understanding of language-specific features—helping you stand out in interviews and on the job. Also, check out the DesignGurus.io YouTube channel for free, in-depth coding and system design tutorials.

CONTRIBUTOR
TechGrind