C# version 9

See what's new in C#9

Table of contents

Records

Init only setters

Top-level statements

Pattern matching enhancements

Performance and interop

Native sized integers

Function pointers

Suppress emitting localsinit flag

Fit and finish features

Target-typed new expressions

static anonymous functions

Target-typed conditional expressions

Covariant return types

Extension GetEnumerator support for foreach loops

Lambda discard parameters

Attributes on local functions

Support for code generators

Module initializers

New features for partial methods

Sources

See also