抛出了类型'System.StackOverflowException'的异常。 [英] Exception of type 'System.StackOverflowException' was thrown.
本文介绍了抛出了类型'System.StackOverflowException'的异常。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到的是"例外情况类型'System.StackOverflowException'被抛出"视觉工作室2015/2017在运行时的例外情况。它使用垃圾值
命中所请求的方法并抛出此异常。
我对Linq查询进行了大量计算。请帮我解决这个问题。
I have lot of calculation with Linq queries. Please help me to resolve this issue.
问候,
< span style ="font-size:0.75em"> Avijit
推荐答案
什么您正在开发应用类型?
根据例外情况,问题似乎与您的代码有关, 我想知道你是否
返回属性本身(这会对get方法进行隐式调用),这就是为什么属性将递归调用自身并导致堆栈溢出。
Based on the exception, the issue seems related to your code, I wonder if you return the property itself (which makes an implicit call to the get method), that’s why the property will call itself recursively and cause a stack overflow.
问候,
Fletcher
Fletcher
这篇关于抛出了类型'System.StackOverflowException'的异常。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文