多动态数组溢出?
我有一个问题,我正在使用 asp.net 进行编程,
我有一个多动态数组,
array_results(i, 0) = tmpdoc.Get("title")
array_results(i, 0) += tmpdoc.Get("doc_typ")
array_results(i, 1) = tmpdoc.Get("pfad")
array_results(i, 2) = tmpdoc.Get("date_of_create")
array_results(i, 3) = tmpdoc.Get("last_change")
array_results(i, 5) = tmpdoc.Get("doc_typ")
array_results(i, 6) = CStr(score)
var“i”约为 4426,我也使用 2377 对其进行了测试[文件,包含信息],并且出现内存异常错误。
多个动态数组是否有可能获得 oerflow?
谢谢
I have a question, I'm programming with asp.net
I have a multible-dynamic array
array_results(i, 0) = tmpdoc.Get("title")
array_results(i, 0) += tmpdoc.Get("doc_typ")
array_results(i, 1) = tmpdoc.Get("pfad")
array_results(i, 2) = tmpdoc.Get("date_of_create")
array_results(i, 3) = tmpdoc.Get("last_change")
array_results(i, 5) = tmpdoc.Get("doc_typ")
array_results(i, 6) = CStr(score)
The var "i" is about 4426, I tested it with 2377 too [Files, with information] and I get a memory exeption error.
Is it possible, that the multiple dynamic array gets an oerflow?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您应该考虑使用
IEnumerable
并阅读一下关键字yield
和yield return
和产量突破
。本质上,使用将
IEnumerable
返回到调用方法的方法将有助于防止内存不足异常,特别是与我今天早些时候建议的模式结合使用时......System.OutOfMemoryException
I think that you should look into using an
IEnumerable<T>
and do a little reading on the keywordsyield
andyield return
andyield break
.Essentially using a method that returns
IEnumerable<T>
to your calling method will help prevent out-of-memory exceptions, especially when coupled with the pattern that I suggested earlier today...System.OutOfMemoryException