https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version

Edit the csproj file

You can set the language version in your .csproj file. Add an element like the following:

XMLCopy
<PropertyGroup>
<LangVersion>latest</LangVersion>
</PropertyGroup>

The value latest uses the latest minor version of the C# language. Valid values are:

Value Meaning
default The compiler accepts all valid language syntax from the latest major version that it can support.
ISO-1 The compiler accepts only syntax that is included in ISO/IEC 23270:2003 C# (1.0/1.2)
ISO-2 The compiler accepts only syntax that is included in ISO/IEC 23270:2006 C# (2.0)
3 The compiler accepts only syntax that is included in C# 3.0 or lower.
4 The compiler accepts only syntax that is included in C# 4.0 or lower.
5 The compiler accepts only syntax that is included in C# 5.0 or lower.
6 The compiler accepts only syntax that is included in C# 6.0 or lower.
7 The compiler accepts only syntax that is included in C# 7.0 or lower.
7.1 The compiler accepts only syntax that is included in C# 7.1 or lower.
7.2 The compiler accepts only syntax that is included in C# 7.2 or lower.
7.3 The compiler accepts only syntax that is included in C# 7.3 or lower.
latest The compiler accepts all valid language syntax that it can support.

The special strings default and latest resolve to the latest major (C# 7.0) and minor (C# 7.3) language versions installed on the build machine, respectively.

最新文章

  1. 2013 duilib入门简明教程 -- 事件处理和消息响应 (17)
  2. ios - block循环引用Demo示例
  3. 【WP8.1开发】基于应用的联系人存储
  4. flask 程序结构概括
  5. c语言_帮助别人
  6. web项目设计与开发——DBHelper2
  7. SCP和SFTP(都使用SSH。但SCP上传不能中断,而SFTP可以续传,这是最大区别)
  8. MongoDB基础知识 02
  9. 学习Emacs
  10. Spring中的Service/DAO/DTO
  11. otter双A同步配置
  12. TLD算法概述--学习理解之(一)
  13. 导出数据子集:带where条件的exp导出
  14. PAT1029:Median
  15. nmap简介和使用
  16. python中栈的单链表实现
  17. python学习-01
  18. 《图解HTTP》读书笔记(四:HTTP方法)
  19. 《SSO CAS单点系列》之 APP原生应用如何访问CAS认证中心
  20. idea 设置选中代码得背景颜色

热门文章

  1. Android之activity总结
  2. Java没有头文件的原因
  3. Servlet的生命周期以及在Spring MVC中调用流程
  4. LOOPS HDU - 3853 (概率dp):(希望通过该文章梳理自己的式子推导)
  5. Arduino IDE for ESP8266教程(二) 创建WIFI AP模式
  6. 上传文件调用webapi方式
  7. nat表使用
  8. Random.nextInt()替换Math.random()
  9. 关于Java并发编程的总结和思考
  10. AI 主成分分析(PCA)