[英]C# how to change Language version in VS
You can use the LangVersion
tag in your Project file, C# language versioning您可以在项目文件中使用
LangVersion
标记, C# 语言版本控制
The latest C# compiler determines a default language version based on your project's target framework or frameworks.
最新的 C# 编译器会根据您项目的目标框架或多个框架确定默认语言版本。 Visual Studio doesn't provide a UI to change the value, but you can change it by editing the csproj file.
Visual Studio 不提供用于更改值的 UI,但您可以通过编辑 csproj 文件来更改它。
Eg例如
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>Latest</LangVersion>
...
</PropertyGroup>
Or any found here C# language version reference或任何在这里找到的C# 语言版本参考
However read the notes, only some version are available in certain frameworks.但是请阅读说明,某些框架中只有一些版本可用。 And some are only partially supported
有些只是部分支持
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.