Languages and runtimes
.NET 11 Preview 5 and C# 15 union types featured at Build 2026
- Category: Languages
- Status: confirmed
- Sources: .NET 11 Preview 5 blog, Build 2026 .NET sessions
- Summary: Microsoft featured .NET 11 Preview 5 at Build 2026. C# 15 introduces union types, described by the team as the largest type-system addition to C# since nullable reference types. Unions model closed sets of data shapes with exhaustive pattern matching and replace common third-party discriminated union workarounds such as the OneOf library. .NET 11 general availability is targeted for November 2026. The feature is available now in Preview 5 by targeting
net11.0with preview language version enabled. - Why it matters: C# 15 union types will change how domain models and wire-protocol parsers are written in .NET codebases; early adoption in preview reduces migration pressure before the November GA.