名称为“nameof'不存在于当前上下文存在 [英] The name 'nameof' does not exist in the current context

查看:5649
本文介绍了名称为“nameof'不存在于当前上下文存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2013 .Net框架4.6。我想用新的C#6的特性(例如 nameof )。但我无法发现它。

I'm using VS 2013 with .Net Framework 4.6. I want to use new C# 6 features(For example nameof).But I couldn't found it.

我应该使用VS 2015年?以上.Net框架?

Should I use VS 2015? Or higher .Net Framework?

推荐答案

是,要使用C#6的特性,你需要一个C#编译器6。的Visual Studio 2013不具有一个C#6的编译器。 。的Visual Studio 2015确实

Yes, to use C# 6 features, you need a C# 6 compiler. Visual Studio 2013 doesn't have a C# 6 compiler. Visual Studio 2015 does.

有过罗斯林之前版本的Visual Studio 2013年,但他们没有实现最终的C#6:他们其实并不实现所有特点,和他们做什么实现从最终的C#6行为不同。

There have been Roslyn pre-releases for Visual Studio 2013, but they don't implement the final C# 6: they actually don't implement all the features, and what they do implement is different from the final C# 6 behaviour.

这篇关于名称为“nameof'不存在于当前上下文存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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