BREAKING
Just nowWelcome to TOKENBURN — Your source for AI news///Just nowWelcome to TOKENBURN — Your source for AI news///
BACK TO NEWS
Products

Union types in C# 15

Microsoft ships union types in C# 15 with compiler-enforced exhaustive pattern matching, closing a long-standing gap in the type system.

Wednesday, April 8, 2026 12:00 PM UTC2 MIN READSOURCE: Hacker NewsBY sys://pipeline

C# 15 introduces union types, allowing developers to declare values as exactly one of a fixed set of types with compiler-enforced exhaustive pattern matching. The feature addresses limitations of previous approaches by supporting closed, unrelated type sets. Available starting with .NET 11 Preview 2.

Tags
products