November 10, 2020

C# 9 released with .NET 5

C# 9 shipped with .NET 5 on November 10, 2020 — adding records, init-only properties, and top-level programs.

What it was for

C Sharp (programming language)C# 9's `record` types made immutable data classes one-liners; `init` accessors enabled object initializers without public setters; top-level statements removed boilerplate `Main` methods. The features shaped modern .NET APIApplication programming interface — a defined way for programs to talk to each other or to a service. design and minimal hosting templates.

Companies

  • Microsoft

Why it's here

C# 9 records became the default pattern for DTOs and APIApplication programming interface — a defined way for programs to talk to each other or to a service. models in .NET 5+.

Why it mattered

Init-only properties and records reduced mutable-state bugs in enterprise code.

What it solved

Immutable data types required verbose class definitions or external libraries.

Media

  • C Sharp (programming language)
    ImageC Sharp (programming language)

    Microsoft, Public domain, via Wikimedia Commons

Related