<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Csharp on cekrem.github.io</title><link>https://cekrem.github.io/tags/csharp/</link><description>Recent content in Csharp on cekrem.github.io</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 09 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://cekrem.github.io/tags/csharp/index.xml" rel="self" type="application/rss+xml"/><item><title>C# 15: Union Types, Closed Hierarchies, and the One Value™ That Isn't Any of Them</title><link>https://cekrem.github.io/posts/csharp-15-union-types/</link><pubDate>Mon, 09 Nov 2026 00:00:00 +0000</pubDate><guid>https://cekrem.github.io/posts/csharp-15-union-types/</guid><description>&lt;p&gt;.NET 11 launches this week at &lt;a href="https://dotnet.microsoft.com/en-us/conf" class="external-link" target="_blank" rel="noopener"&gt;.NET Conf&lt;/a&gt;, and with it comes C# 15. The headline feature, at least for someone like me, is &lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/union" class="external-link" target="_blank" rel="noopener"&gt;union types&lt;/a&gt;. People have been asking for discriminated unions in C# for years, and now there&amp;rsquo;s a &lt;code&gt;union&lt;/code&gt; keyword in the language.&lt;/p&gt;&#10;&lt;p&gt;A disclaimer before we start: &lt;strong&gt;C# is not my home turf.&lt;/strong&gt; I write Elm on the frontend, I&amp;rsquo;ve done a fair bit of Kotlin, and I &lt;a href="https://cekrem.github.io/posts/why-i-hope-i-get-to-write-a-lot-of-fsharp-in-2026/" &gt;hope to write a lot more F#&lt;/a&gt;. So this is an outsider looking at a feature I care about, in a language I don&amp;rsquo;t use daily. If I&amp;rsquo;ve missed some well-known C# idiom below, I&amp;rsquo;d genuinely like to hear about it.&lt;/p&gt;</description></item></channel></rss>