直到今天,在我们将 Visual Studio 2017 更新到最新的 15.3 之后,我们的 UWP 应用程序中的以下代码一直运行良好。
private void Test()
{
var groups = new List<(Guid key, IList<(string, bool)> items)>();
var items = new List<(string, bool)>
{
("a", true),
("b", false),
("c", false)
};
var group = (Guid.NewGuid(), items);
groups.Add(group);
}
在输出窗口中没有错误信息但是这个
Tuple element name 'items' is inferred. Please use language version 7.1 or greater to access an element by its inferred name.
知道为什么以及如何解决这个问题吗?
最佳答案
项目->属性->构建->高级->语言版本->C#最新次要版本
关于c# - 获取 "Tuple element name is inferred. Please use language version 7.1 or greater to access an element by its inferred name.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45684409/