I am using a two-dimensional array of 10 elements, but my code is extremely slow.
Dim myArray As String(,)
For i=0 to 100
'Clear Array. (This line is really slow)
myArray = New String(,) {{"", ""}, {"", ""}, {"", ""}, _
{"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}}
'Populate array
fillArray(myArray)
'Do stuff with array
useArray(myArray)
Next i
I create a new empty array with every iteration of the for loop. Is there a way I can use the same array but just clear it instead?