Extension Indexers in C# 15: Finally, this[] on Types You Don't Own
C# 15 rounds out extension members with indexers, letting you add this[] syntax to types you can't modify. Here's how the syntax works, how resolution is prioritised against real indexers, and where the preview feature still bites.
Closed Class Hierarchies in C# 15: Exhaustive Matching Comes to Inheritance
C# 15 introduces the closed modifier for class hierarchies, restricting derivation to the declaring assembly and enabling exhaustive switch expressions without a default arm. Here is how it works, how it differs from unions and sealed classes, and where it fits in domain modelling.
Collection Expression Arguments in C# 15: Passing Capacity, Comparers, and More with the with() Syntax
C# 15 adds the with() element to collection expressions, letting you pass constructor arguments like capacity and comparers directly inside the bracket syntax. Here is how it works, what it compiles to, and where it falls short.
Union Types in C# 15: Exhaustive Pattern Matching Without the Workarounds
C# 15 introduces union types with the union keyword, bringing implicit conversions, exhaustive switch expressions, and compiler-enforced closed type sets to .NET. Here is what they look like, how they lower to structs, and where they replace the OneOf hacks.