C# 15 union types in .NET 11: migrating off OneOf without boxing your hot path
Union types arrive in C# 15 with .NET 11, expected November 2026. The compiler generates a struct that stores its contents as object?, so every int or struct case boxes on assignment. There is a documented way around it.