Everything You Need to Know About the Latest in C#
dotnet covers upcoming and recent C# language features, focusing on union types for modeling closed sets of shapes (common in wire protocols), plus a look at extension members and closed classes and how these features aim to make consuming code clearer and safer.
Overview
Union types in C#
- Union types are presented as a way to model closed sets of data shapes.
- The video frames unions as especially useful for scenarios like wire protocols, where a message can be one of a known set of shapes.
- The discussion emphasizes how unions can make intent explicit and help produce consuming code that is more confident and elegant.
Other C# features discussed
- Extension members: adding new members to existing types.
- Closed classes: a feature discussed as part of the broader set of recent and upcoming C# capabilities.
Links
- Blog: https://aka.ms/dotnet/blog
- Twitter: https://aka.ms/dotnet/twitter
- TikTok: https://aka.ms/dotnet/tiktok
- Mastodon: https://aka.ms/dotnet/mastodon
- LinkedIn: https://aka.ms/dotnet/linkedin
- Facebook: https://aka.ms/dotnet/facebook
- Docs: https://learn.microsoft.com/dotnet
- Forums: https://aka.ms/dotnet/forums
- Q&A: https://aka.ms/dotnet-qa
- Microsoft Learn: https://aka.ms/learndotnet