如何删除异常“预定义类型”ValueTuple`2'必须是一个结构体“调试时? [英] How can I remove exception "Predefined type 'ValueTuple`2' must be a struct" when debugging?
本文介绍了如何删除异常“预定义类型”ValueTuple`2'必须是一个结构体“调试时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始在c#7.0中使用新的元组功能,但是我注意到,在调用模式下,在返回元组的函数和调用者中都不可能检查变量值。相反,显示了一个例外:
I started using the new tuple feature in c# 7.0 but I noticed that neither in the function that returns a tuple nor in its caller is possible to check the variable values in debug mode. Instead an exception is shown:
$exception error CS8182: Predefined type 'ValueTuple`2' must be a struct.
有没有办法摆脱这个故障并正常调试?
Is there a way to get rid of that glitch and debug normally?
推荐答案
这似乎是Microsoft已修复的错误,但将来可能会更新(2017)
https://github.com/dotnet/roslyn/pull/16930
It seems a bug that Microsoft has fixed but it will be available in a future update (2017) https://github.com/dotnet/roslyn/pull/16930
这篇关于如何删除异常“预定义类型”ValueTuple`2'必须是一个结构体“调试时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文