Skip to content

C# 9.0

Highlights

  • Records: Immutable reference types with value-based equality
  • Init-only setters: set; init; for object initializers
  • With-expressions: p with { Name = โ€œNewโ€ }
  • Top-level statements: Simplified Program.cs
  • Pattern matching enhancements: relational and logical patterns
  • Target-typed new: new() with inferred type
  • Native sized integers: nint, nuint
  • Covariant returns