如何添加C#6.0到Visual Studio 2013? [英] How can I add C# 6.0 to Visual Studio 2013?

查看:1022
本文介绍了如何添加C#6.0到Visual Studio 2013?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为C#6.0中添加到Visual Studio 2013?如果我不能,为什么会这样?

Is there any way to add C# 6.0 to Visual Studio 2013? If I can't why is that?

推荐答案

目前可以做VS2013最好的是下载的四月最终用户preVIEW ,这是pretty的现在已经过时。

The best you can currently do for VS2013 is download the April End User Preview, which is pretty outdated by now.

在VS2013的编译器(这是)不明白C#-6功能。大多数情况下,如果不是所有的C#的新特性是语法糖,编译器除$ P $点,发出不同的$ C $下。为了让VS2013支持的,它必须升级到编译器支持这些功能。

The VS2013 compiler (as is) doesn't "understand" C#-6 features. Most, if not all of the C# new features are syntactic sugar which the compiler interprets and emits different code for. In order for VS2013 to support that, it has to upgrade the compiler to support those features.

且不说VS2015将带给人们一个全新的CSC,命名为罗斯林

Not to mention VS2015 will bring with it a completely new CSC, named Roslyn

例如,EX pression体属性:

For example, expression body properties:

public override string ToString() => string.Format("{0}, {1}", First, Second);

编译为:

public override string ToString()
{
   return string.Format("{0}, {1}", First, Second);
}

这篇关于如何添加C#6.0到Visual Studio 2013?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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