With the release of .NET 10 just around the corner (next month!), it’s time to take a look at the new features we can expect for C# 14.
Note: the goal of this post is not to be an exhaustive list of all new features. I will only cover the ones that seem the most interesting to me. This doesn’t mean the features I don’t mention are useless, but they just have more niche use cases so they probably won’t have as much impact on most developers.
.NET 6.0 and C# 10 are just around the corner, so now is a good time to review some of the most interesting new language features!
Record structs 📄 Proposal
Records were introduced in C# 9 as a simple way to define data types with value equality semantics, for instance:
public record Money(decimal Amount, string CurrencyCode); An annoying limitation was that records were always reference types, but in some scenarios it would have been better to use value types.
Visual Studio 2012 RC is out since last week, and even though I didn’t have much time to play with it yet, I think I like it so far. Lots of things have already been said about the design, and about the most important new features, but there are also many smaller and less remarkable improvements that make life easier for us. Since I have seen little or nothing written about those, I thought I would make a list of what I noticed so far.