C# 9.0

.NET 5.0 introduced in Visual Studio 2019.

link - learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9 

Record types

You use the record keyword to define a reference type that provides built-in functionality for encapsulating data.

public record Person(string FirstName, string LastName); 

Positional syntax for property definition


Value equality

Nondestructive mutation

Built-in formatting for display


Init only setters

Top-level statements

Pattern matching enhancements

Performance and interop

Fit and finish features

Support for code generators

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext