Posts about C# 15
A while back I wrote a blog post about deserializing a JSON with a field of a variable type in .NET. At that time I used a custom serializer to achieve that. This scenario seems like a good fit for unions which are being added in C# 15. That's a good reason to revisit the topic.
Goto statements have been a part of C# since the very first version, but at least I haven't seen them being used very often. In C# 15, labels can also be used in combination with continue and break statements. What are the use cases and how often can we expect them being used?
Last year, extension members were the biggest new feature of C# 14. I wrote about them in detail in multiple blogposts. This year, extension indexers are being added to C# 15 which didn't make it into C# 14.
Collection expressions were introduced in C# 12. I wrote a blog post about them at that time. In C# 15, the syntax is being extended with the ability to provide additional arguments to the underlying collection constructor or builder.
In the previous blog post I explored what union types bring to C#. But what does the compiler do under the hood? And do I need to know about that to fully take advantage of union types?
Continuing with the topic of switch expression exhaustiveness in C# 15, I chose union types as the next new language feature to explore.
The release of C# 15 is getting closer and its new features started to show up in the .NET 11 previews. That's a good time for me to take a closer look at what to expect. I'm starting with closed class hierarchies.