views:

12

answers:

1

Hello, 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

A: 

I think that you should look into using an IEnumerable<T> and do a little reading on the keywords yield and yield return and yield 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... http://stackoverflow.com/questions/3394495/system-outofmemoryexception/3394691#3394691

Daniel Dyson