I like this C# 15 preview feature: `closed` hierarchies. The compiler knows every direct subtype, so your switch can be exhaustive without a fallback. Add another subtype later and the switch is flagged for you. https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/closed
0 reposts6 likes