Expression tree depth limitations

给你一囗甜甜゛ 提交于 2019-12-04 07:41:13

You are legitimately running into a limit on the stack size (although I question the wisdom of a 400+ item lambda). The easiest way to bypass that is to create a new thread specifically for performing this compilation with a larger stack, using the thread constructor that takes the stack size as an argument: http://msdn.microsoft.com/en-us/library/ms149581.aspx

Call compile in that thread and increase the stack size argument as necessary. It is in bytes I believe, which would make the default about 1048576, so start there and raise it as needed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!