我开始在 c# 7.0 中使用新的元组功能,但我注意到无论是在返回元组的函数中还是在其调用者中都无法在 Debug模式下检查变量值。而是显示了一个异常:
$exception error CS8182: Predefined type 'ValueTuple`2' must be a struct.
有没有办法摆脱那个小故障并正常调试?
最佳答案
这似乎是 Microsoft 已修复的错误,但它将在 future 的更新 (2017) 中可用
https://github.com/dotnet/roslyn/pull/16930
关于debugging - 调试时如何删除异常 "Predefined type ' ValueTuple` 2' must be a struct"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42856319/