C# 9

Bassam Alugili
12 min readNov 27, 2019

The official planned next C# release is C# 9. You can find in the link below the Language Version Planning for C#·

https://github.com/dotnet/csharplang/projects/4#column-4899858.

As shown above, in the list, there are 34 proposals/features are planned for C# 9, but that does not mean that all of those proposals will be released in C# 9.
Which proposal will be released, and in which version? The .Net development team can only answer all these questions. They have the final decision, and they can change their minds all the time, both on proposed features and syntax/semantics of these features.

The most important features planned for C# 9, namely record types, potentially discriminated unions, more pattern matching enhancements, and additional target-typing of existing constructs such as ternary and null-coalescing expressions.

In this article, I will describe Record and Discriminated Unions and the other proposals I will describe them briefly.

Records
I have been waiting for a long time for this feature. Records are a lightweight immutable type. They are nominally typed, and they might have (methods, properties, operators, etc.), and allow…

--

--

Bassam Alugili
Bassam Alugili

Written by Bassam Alugili

Bassam Alugili is Senior Software Specialist and databases expert at STRATEC SE

No responses yet