我在 VS2010 中调试,我想检查一个字符串值,但我只能让调试器向我展示(通过监视、悬停、局部变量等)是:
"System.Linq.Enumerable+<TakeIterator>d__3a`1[System.Char]"
我不关心过早求值是否有副作用,我只是想看看如果我现在在当前断点处求值,表达式会求值什么。
这是怎么做到的?我还可以以更早评估的方式更改我的代码吗?不是说我不在调试时关心...只是想知道。
In case it is relevant... (I doubt it.) I'm stuffing a new entity object before saving it to the database... some fields are assigned with LINQ statements, I'm not sure when they get evaluated under the covers of EF. The DB update fails with 'string or binary data would be truncated... So I'm trying to find the too-long field.
最佳答案
关于c# - 调试时如何评估延迟的 Linq 语句?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2702390/