7

.NET解决方案如何配置C#语言版本?

 3 years ago
source link: http://blog.devwiki.net/index.php/2020/01/15/config-c--version-in--net-solution.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

DevWiki

.NET解决方案如何配置C#语言版本?
1. 打开项目所在文件夹2. 在解决方案的根目录创建文本文件, 并命名为: Directory.Build.pro...
扫描右侧二维码阅读全文
15
2020/01

.NET解决方案如何配置C#语言版本?

  1. 首页

1. 打开项目所在文件夹

picgo20200115193217.png

2. 在解决方案的根目录创建文本文件, 并命名为: Directory.Build.props

picgo20200115193529.png

3. 将此文件拖入 VS中打开 或者使用文本编辑器打开, 并输入一下内容

<Project>
  <PropertyGroup>
    <LangVersion>6.0</LangVersion>
  </PropertyGroup>
</Project>

其中的 LanguageVersion 即为 C# 的版本, 可以根据需要修改.

最后修改:2020 年 01 月 15 日 07 : 54 PM
如果觉得我的文章对你有用,请随意赞赏

发表评论 取消回复

评论 *

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK