我已经安装了Visual Studio 15 Preview 3,并尝试使用新的元组功能。
static void Main(string[] args)
{
var x = DoSomething();
Console.WriteLine(x.x);
}
static (int x, int y) DoSomething()
{
return (1, 2);
}
编译时出现错误:
预定义类型 'System.ValueTuple´2´ 未定义或未导入
根据博客文章,这个功能应该默认为“开启”状态。
我做错了什么?