Skip to content

.NET 11 ships with C# 15, union types and closed hierarchies

The annual release is a two-year Standard Term Support version, landing closed hierarchies, extension indexers, and experimental EF Core vector search alongside the new language features.

Microsoft shipped .NET 11 today, 10 November, as a Standard Term Support release covered for two years. It lands the same day .NET 8 and .NET 9 both reached end of support, and comes alongside C# 15.

The language gets union types, so a value can be declared as one of a fixed set of case types, with the compiler checking switch expressions for exhaustiveness. C# 15 also adds closed hierarchies, letting a class restrict direct derivation to its own assembly, plus extension indexers and labelled break and continue statements. Elsewhere, ASP.NET Core defaults to OpenAPI 3.2, EF Core 11 adds experimental vector search for SQL Server, and Native AOT becomes the default CLI host.

<TargetFramework>net11.0</TargetFramework>

Why it matters: union types and closed hierarchies are modelling tools C# developers have wanted for a while, and they arrive with proper switch-exhaustiveness checking rather than as a library workaround. The EF Core vector search addition is also worth a look for anyone bolting similarity search onto an existing SQL Server app rather than reaching for a separate vector database.

The caveat: .NET 11 is STS, covered for two years, not the longer LTS track. Teams who want more runway should stay on .NET 10 rather than jumping straight to 11.

Share

More from The Wire

All briefs