如何在 Visual Studio 2015 中更改语言版本 [英] How to change language version in Visual Studio 2015

查看:26
本文介绍了如何在 Visual Studio 2015 中更改语言版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Visual Studio 2015 的 C# 项目中使用 nameof 运算符,但编译器抱怨以下消息.

I want to use the nameof operator in my C# project in Visual Studio 2015 but the compiler complains with the following message.

功能nameof operator"在 C# 5 中不可用.请使用语言版本 6 或更高版本.

Feature 'nameof operator' is not available in C# 5. Please use language version 6 or greater.

我想知道如何从 Visual Studio 2015 更改 C# 语言版本.

I want to know how I can change the C# language version from Visual Studio 2015.

推荐答案

试试这个..

项目 -> 属性 -> 构建 -> 高级 -> 语言版本

这篇关于如何在 Visual Studio 2015 中更改语言版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆