November 14, 2023
C# 12 released with .NET 8
C# 12 shipped with .NET 8 on November 14, 2023 — adding primary constructors, collection expressions, and ref readonly parameters.
What it was for
C# 12's primary constructors cut class boilerplate for DI and records; collection expressions (`1, 2, 3`) unified array and span initialization syntax. The release paired with .NET 8 LTSLong-term support — a release branch maintained with security fixes for years, common in Linux and Node. for the 2024–2026 enterprise cycle.
Companies
- Microsoft
Why it's here
C# 12 primary constructors simplified dependency injection patterns across .NET 8 apps.
Why it mattered
Collection expressions reduced syntactic noise for data-heavy modern C#.
What it solved
Constructor and collection initialization required verbose, inconsistent syntax.
Media
- ImageC Sharp (programming language)
Microsoft, Public domain, via Wikimedia Commons
Related
- .NET 8 LTS releasedNovember 14, 2023
- C# 11 released with .NET 7November 8, 2022
- C# 10 released with .NET 6November 8, 2021