Search code examples
c#.net.net-framework-versionc#-7.2

In Which .Net Framework Version C# 7.2 is Available


I tried installing .net framework 4.7.2, still the target framework is empty in the project properties. The program I'm trying to run uses readonly struct, which is part C# 7.2.

Could you please guide me .Net Framework version has C# 7.2?


Solution

  • Language features are independent of .Net version (Framework/Core/Standard).

    You will need to use a compiler that understands the newer language features. Assuming you're using Visual Studio 2017, you should update to latest version.