VB.net array question

  • Thread starter Thread starter MattB
  • Start date Start date
M

MattB

Slightly OT, but I know someone must know off the top of their head (and
this is for a asp.net application).
I have a one dimensional array of a string type that was created using
String.Split. I now want to add an additional dimension without losing
what's stored in the original array. Suggestions? Thanks!

Matt
 
I'd say, create a new array and copy the content of the first array in the
second array... as far as I know, you can't change the dimension count of
an array with redim, so you have to dim another array and copy.

I hope it helps

ThunderMusic
 
Thanks. I had that as my fallback option, but I thought maybe I could do
some kind of redim but couldn't come up with a way.
I guess it's time for the fallback!

Matt
 
Back
Top