# C# 15: Union types

Union types on one page: the problem they solve, how to declare one, and how the compiler checks every switch. From the blog post \[What's new in C# 15: Union types\](/blog/whats-new-in-csharp-15-union-types).

![The cheat sheet C# 15: Union types, with Codey: the three points of the post on one page](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/2c332d05b4b94d5bb04f635000538582.webp)

- Category: C#
- Level: Apprentice
- Tags: csharp, csharp-15, whats-new
- Updated: November 11, 2026

Source: https://www.ask-codey.com/cheat-sheets/csharp-15-union-types-cheat-sheet
