By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

reinitialize an array

P: n/a
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?

Jan 18 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
"Seigfried" <Se*******@msn.comwrote in message
news:11*********************@q2g2000cwa.googlegrou ps.com...
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?

Jan 18 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.