L
Lance
What is the best way to Dim a jagged array. For example,
if I want a 2D jagged array with a width of 16 and a
height of 4, it would be nice to be able to do the
following:
Dim myArray(3)(15) As Integer
Of course this causes a compile error. So, now I'm doing
something like this:
Dim myArray(3)() As Integer
For i as Integer = 0 to 3
Dim myArrayRow(15) As Integer
myArray(i) = myArrayRow
Next i
Is there a better way? (Note: For my needs you can
assume that all rows of the jagged array will be the same
width.)
Thank you,
Lance
if I want a 2D jagged array with a width of 16 and a
height of 4, it would be nice to be able to do the
following:
Dim myArray(3)(15) As Integer
Of course this causes a compile error. So, now I'm doing
something like this:
Dim myArray(3)() As Integer
For i as Integer = 0 to 3
Dim myArrayRow(15) As Integer
myArray(i) = myArrayRow
Next i
Is there a better way? (Note: For my needs you can
assume that all rows of the jagged array will be the same
width.)
Thank you,
Lance