What’s new in C# 9.0 and beyond
summary
.NET 5 ships C# 9 with concrete changes: top-level statements let files contain bare program code; init-only properties restore object-initializer syntax for immutable types by allowing setters only during initialization; records implement value semantics (automatic ToString, recursive value equality, generated deconstructors, and primary-constructor init properties) and support non‑destructive updates via with-expressions that copy-and-modify; pattern matching adds relational and logical patterns; the team explores static abstract interface members to enable generic numeric algorithms.
AI-written summary · about
