VB.net array question

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
 
T

ThunderMusic

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
 
M

MattB

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top