Arian Arian - 1 month ago 30
C# Question

The name 'nameof' does not exist in the current context

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.

enter image description here

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

hvd hvd
Answer

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.

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.

Comments