Enabling C# 11 and using the benefits of the new language statements is incredible.
I'll not discuss the benefits. There are tons of information on the internet about this, but some are,
- Type inference
- Async and await keywords
- The using keyword
- Better support for functional programming
- Improved support for LINQ
- Improved support for standard libraries
- Better performance
Visit here to explore the C# 11 Features.
You will need Visual Studio 2022 or above.
It demands a simple adjustment in your C# project like that,
- Unload your project
- Add a LangVersion property
So it's ready!
Some features of C# 11 will not be available in .NET Framework 4.7.2. They are ready only for .NET 7 and above. This is a way for you so don't miss the bus of technology.