Watching an array size

  • Thread starter Thread starter cmdolcet69
  • Start date Start date
C

cmdolcet69

I found something curious today when i add my arraylist to my watch
window i notice that my array size with looping was 501 however it
only displayed 200. Why is that?
Dim i As Integer
Dim arr As New ArrayList

For i = 0 To 500
arr.Add(i)
Next
 
I found something curious today when i add my arraylist to my watch
window i notice that my array size with looping was 501 however it
only displayed 200. Why is that?
Dim i As Integer
Dim arr As New ArrayList

For i = 0 To 500
arr.Add(i)
Next

Array Lists are 0 indexed (0... 500 = 501 elements)

So to add 500 elements, it should be 500 - 1
 
cmdolcet69 said:
I found something curious today when i add my arraylist to my watch
window i notice that my array size with looping was 501 however it
only displayed 200. Why is that?
Dim i As Integer
Dim arr As New ArrayList

For i = 0 To 500
arr.Add(i)
Next

There must be a limit somewhere. Otherwise it can take very long to display
the window, e.g. if you have 100,000 items in the array.

In VB 2005, there is no such limit AFAIS. (probably differently rendered)


Armin
 
Back
Top