# .NET (OK, C#) finally gets union types🎉: Exploring the .NET 11 preview - Part 2

DevFeed: [.NET (OK, C#) finally gets union types🎉: Exploring the .NET 11 preview - Part 2](<https://devfeed.tech/articles/net-ok-c-finally-gets-union-types-exploring-the-net-11-preview-part-2-51474.md>)

Original publisher: [Read original article](<https://andrewlock.net/exploring-the-dotnet-11-preview-2-dotnet-gets-union-types/>)

Author: Andrew Lock

Published: 2026-05-19T10:00:00Z

Content type: article

Language: en

Sources: [Andrew Lock | .NET Escapades](<https://devfeed.tech/sources/andrew-lock-net-escapades.md>)

Topics: [.NET](<https://devfeed.tech/topics/net.md>), [union types](<https://devfeed.tech/topics/union-types.md>), [C#](<https://devfeed.tech/topics/csharp.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>)

Tags: [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [c-sharp-15](<https://devfeed.tech/tags/c-sharp-15.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [net](<https://devfeed.tech/tags/net.md>), [net-11](<https://devfeed.tech/tags/net-11.md>), [net-11-c-sharp](<https://devfeed.tech/tags/net-11-c-sharp.md>), [preview](<https://devfeed.tech/tags/preview.md>), [programming](<https://devfeed.tech/tags/programming.md>), [types](<https://devfeed.tech/tags/types.md>), [union-types](<https://devfeed.tech/tags/union-types.md>)

## AI overview

The post examines union types in C# 15 and .NET 11 preview, covering their purpose, implementation, usage, and custom type creation. It also explains how unions can represent values from several potentially unrelated types and relates them to the result pattern.

## Source excerpt

In this post I discuss the support for union types released in .NET 11, how they're implemented, the choices made, and how to create your own