为什么 Visual Studio 监视 window 显示集合中 ValueTuples 的错误值?

Why does the Visual Studio watch window show wrong values for ValueTuples in a collection?

我发现当我从集合中访问它们的属性时,ValueTuples 的计算方式不同。

    public static List<Tuple<string, bool>> MyTupleList = new List<Tuple<string, bool>>
    {
        new Tuple<string, bool>("test", true)
    };

    public static List<(string b, bool c)> MyList = new List<(string b, bool c)>
    {
        ("test", true)
    };

为什么这两条突出显示的行的计算方式不同,我如何更改 "MyList[0].c" 以正确获取值?

这似乎是 Visual Studio 2017 中的错误。

Roslyn 的 github 问题跟踪器中提到了一些相关的错误,例如:

由于 Visual Studio 的问题跟踪器不是 public,我们只能等待并希望这些错误得到修复。