Discriminated unions in C# and .NET 11 (for real this time)
C# 15 introduces first-class discriminated unions with the new union keyword, enabling exhaustive pattern matching and implicit conversions.
C# 15 introduces first-class discriminated unions with the new union keyword, enabling exhaustive pattern matching and implicit conversions.
C# 15 introduces union types, allowing developers to model values that can be one of several types with compile-time safety.
Explains how to use TypeScript's Omit utility type with discriminated unions for better React component prop typing.
Explores the concept of discriminated unions in C#, their implementation using generic Results classes, and their application in ASP.NET Core Minimal APIs.
Explores potential future features for the C# programming language, including compound assignments in object initializers and discriminated unions.
Explains how destructuring breaks TypeScript's discriminated union type narrowing and offers workarounds.
A technical article presenting a contract pattern for encoding and decoding discriminated union types in schemaless data stores, using the TypeShape library.