我安装了一周前发布的Visual Studio 2017社区,并开始探索C#7的新功能.
所以我创建了一个简单的方法,返回两个值:
public class Program
{
public static void Main(string[] args)
{
(int sum, int count) a = ReturnTwoValues();
}
static (int sum, int count) ReturnTwoValues() => (1, 1);
}
编译器正在生成错误:
错误CS8137无法定义使用元组的类或成员
我试着在框架中找到一个同名的引用,但没有成功!
If we need additional stuff to use C# 7.0 features, then it is very weird that we need to do that for every project ?!个