Mattb,
Array.Copy requires both arrays to have the same dimensions.
You will have to use a For loop to copy the elements.
Something like:
Dim x(9) As Integer
Dim y(9, 1) As Integer
For index As Integer = 0 To x.Length - 1
y(index, 0) = x(index)
Next
Hope this helps
Jay
"MattB" <(E-Mail Removed)> wrote in message
news:c5f1tm$uk8m$(E-Mail Removed)...
> I was actually just trying that approach. I'm having trouble using
> array.copy to go from a one-demensional array to a two-dimensional array.
> Anyone got a sample? Thanks!
>
> Matt
>
> Raymond Lewallen wrote:
> > Matt,
> >
> > I don't believe you can add a dimension to an array. I would declare
> > a new array and use array.copy to move the contents of the old 1-dim
> > array into the new multi-dim array.
> >
> > HTH,
> >
> > Raymond Lewallen
> >
> > "MattB" <(E-Mail Removed)> wrote in message
> > news:c5ets3$uljh$(E-Mail Removed)...
> >> I have an one dimensional array being created from a delimited list
> >> using string.split. Now I'd like to take that array and add another
> >> dimension and manually put a value in there based on the contents of
> >> the first element. I can loop through my array no problem, but I
> >> don't see how (if?) I can add another "column" to it. Seems like it
> >> should be simple.
> >>
> >> Can I do this? How? TIA!
> >>
> >> Matt
>
>
>
|