C# 15 closed hierarchies: exhaustive switch expressions without a discard arm
The closed modifier in C# 15 and .NET 11 tells the compiler that a class's direct subclasses are complete and live in its own assembly. That makes switch expressions over the hierarchy exhaustive, so no discard arm or UnreachableException is needed.