reinitialize an array

  • Thread starter Thread starter Seigfried
  • Start date Start date
S

Seigfried

An array can be initialized with code like this:

Dim myArray() as String = {"1", "2", "3"}

What I'd like to do is reinitialize the same array. Something like the
statement:

myArrray = {"4", "5", "6"}

(which doesn't work, of course)

Any suggestions?
 
Dim myArray as String() = New String() {"1", "2", "3"}

myArray = New String() {"4", "5", "6"}


Note that the only difference, apart form the value, is that the first time,
the Dim ... is used and subsequently it is not required.
 
Back
Top