Unlocking the Power of the New C#12: 4 Innovative Ways for Everyday Coding


.NET 8 is coming in November, and Microsoft surprises us with C# 12.0 previews. The following outstanding language version can already be experienced in the 7th iteration.

The excitement is already mounting — C# 12.0 is coming! Will there be anything new this time? Listen up, I may have already spoiled it: yeah!

How To Enable The New Version

  • Download the preview version of your desire
  • Install it while your code editor is closed
  • Open your code editor and change the .csproj file (more on that below)

Taking a look at C#12.0 is worthwhile and rewarding. Many new features are long-awaited. Not only from my POV.

So let’s land a .NET 8 Preview SDK on your machine. Make Visual Studio take advantage of the latest features. But not only changing the version to net8.0 is necessary to develop an application with C# 12. You also need to adjust the *.csproj file of the project by switching the LangVersion to preview.

here