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 Sharp (programming language)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

  • C Sharp (programming language)
    ImageC Sharp (programming language)

    Microsoft, Public domain, via Wikimedia Commons

Related