C# 11 has a release date of November 2022, and will be launched with .NET 7.
However, we are able to preview some of the C# 11 features that are included right now.
The features included in this code sample include:
- Required members
- Auto-default structs
- Raw string literals
- Generic attributes
- List patterns
This is the software that will need to be installed onto your machine.
- Visual Studio 2022 17.3.0 above. It will work with the free community version.
- .NET 7 SDK preview 6 or above.
Get the application working
These are the steps to get the application working.
- Fill out the source code form. We will send you an email where you can download the code sample.
You are now ready to go.
Open the project in Visual Studio
RoundTheCode.CSharp11.sln in Visual Studio 2022 Preview.
Look at the code, or run the console application to see it in action.
Watch our video where we preview some of the C# 11 features.
In addition, you can read about C# 11: features for .NET 7.