May 23, 2026
A union of hype, fear, and shade
dotNET (OK, C#) gets union types
After years of begging, C# finally adds a fan-favorite feature—and the comments are chaos
TLDR: C# in the upcoming .NET 11 preview is adding union types, a long-awaited way to represent one thing as several possible kinds of data more cleanly. Commenters are split between “finally,” “F# already did this,” and “great, now confusing code will get even weirder.”
Microsoft’s C# language is finally getting union types in the .NET 11 preview—a long-requested feature that basically lets one value cleanly stand for different kinds of things without turning your code into a mystery box. The blog post frames it as a big quality-of-life upgrade, especially for handling “success or error” situations and mixed data types like Windows, Linux, or Mac entries. In plain English: developers can now describe messy real-world data more directly, instead of relying on awkward workarounds.
But the real fireworks are in the comments, where this news instantly turned into a language rivalry reunion tour. One camp basically shouted, “F# did it first,” with munchler rolling their eyes that C# keeps getting the spotlight while its functional-programming sibling keeps being the trendsetter. Another group was genuinely thrilled—not because they want flashy new syntax, but because it should make C# play nicer with other languages and systems.
Then came the doom-posting. Quarrelsome summed up the anxiety with a very relatable fear: if code is confusing now, what happens when developers get a brand-new toy? Others zoomed in on edge-case limitations, like whether some two-of-the-same-type combinations will work at all. And in classic comment-thread fashion, one person used the moment to ask if anyone even uses .NET outside Windows anymore. So yes, C# got a shiny new feature—but the community reaction was a perfect blend of victory lap, sibling jealousy, and “this will absolutely make my coworker’s code worse” panic.
Key Points
- •The article says union types are being added in .NET 11 through C# 15, based on features available in .NET 11 preview 4.
- •It defines union types as types that can represent multiple possible cases and notes they are common in languages such as F#, TypeScript, and Rust.
- •The post uses `Result<TSuccess, TError>` as an example, describing explicit success and error states that callers must handle.
- •It shows a use case where a value may be one of several unrelated record types such as `Windows`, `Linux`, or `MacOS`, and says C# 15 adds direct language support for this scenario.
- •The generated union type implements `IUnion`, exposes an `object? Value` property, and is intended to be consumed primarily through exhaustive switch expressions.