[英]How to change language version in Visual Studio 2015
I want to use the nameof
operator in my C# project in Visual Studio 2015 but the compiler complains with the following message. 我想在Visual Studio 2015中的C#项目中使用
nameof
运算符,但编译器会抱怨以下消息。
Feature 'nameof operator' is not available in C# 5. Please use language version 6 or greater.
功能'运营商名称'在C#5中不可用。请使用语言版本6或更高版本。
I want to know how I can change the C# language version from Visual Studio 2015. 我想知道如何从Visual Studio 2015更改C#语言版本。
Go to Project → Properties → Build → Advanced → Language Version → OK as shown with detail steps and screen shots below: 转到项目 → 属性 → 构建 → 高级 → 语言版 → 确定 ,如下所示的详细步骤和屏幕截图:
Follow these steps to change the language version of your project 请按照以下步骤更改项目的语言版本
1: Open your project with Visual Studio 2012, 2013 or 2015, click on View from Menu and then click on Solution Explorer 1:使用Visual Studio 2012,2013或2015打开项目,单击“从菜单查看” ,然后单击“ 解决方案资源管理器”
2: From Solution Explorer , Right Click on the project and Properties from context menu 2:从解决方案资源管理器中 ,右键单击项目和上下文菜单中的属性
3: From properties dialog, select the tab Build and click on Advanced button 3:从属性对话框中,选择Build选项卡,然后单击Advanced按钮
4: Now, from Advanced Build Settings dialog, select Language Version and click OK button. 4:现在,从Advanced Build Settings对话框中选择Language Version ,然后单击OK按钮。 Thats it.
而已。
Try this.. 尝试这个..
Project -> Properties -> Build -> Advanced -> Language Version 项目 - >属性 - >构建 - >高级 - >语言版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.