2010-08-03 13 views
0

我有一個問題,我與編程asp.net多重動態數組溢出?

我有一個multible動態數組

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這個「我」講述的是4426,我用2377太[文件進行了測試,與信息],我得到一個內存exeption錯誤。

是否有可能,多個動態數組得到一個oerflow?

感謝

回答

0

我認爲,你應該考慮使用IEnumerable<T>做的關鍵字yieldyield returnyield break一點閱讀。

基本上使用返回IEnumerable<T>您調用方法的方法將有助於防止出現內存不足的例外,尤其是當與我今天早些時候提出的模式加上... System.OutOfMemoryException