0

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

skaffman
  • 398,947
  • 96
  • 818
  • 769
tim
  • 197
  • 1
  • 2
  • 10

1 Answers1

0

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... System.OutOfMemoryException

Community
  • 1
  • 1
Daniel Dyson
  • 13,192
  • 6
  • 42
  • 73