Jerry,
All arrays are Base 0 arrays, with the conversion from VB6 to VB 2002 they
have made the in my opinion wrong simple decission to add 1 element after
every array in VB rather then let the microsoft.VisualBasic functins start
on 0 (while logical using the first as 1). The VB6 lobby was very strong in
those days, in fact the wanted absolute no changes in VB6.
We have to deal with that now.
To give you a sample how you can copy. However if you have non fixed arrays
it is better to avoid them there are more alternatives for that, than I can
write here.
\\\\
Dim A() As Byte = {1}
Dim B(A.Length - 1) As Byte
A.Copy(A, B, A.Length)
///
Cor
"Jerry Spence1" <12*@dfgh.comschreef in bericht
news:R6******************************@posted.plusn et...
>I have one array which is base 1 (rather than 0) and I am trying to use
array.copy to copy it into a new array. I get the error:
Unable to cast object of type 'System.Byte[*]' to type 'System.Byte[]'.
I think this is because the new array, by default is base 0. Without
creating a wasteful loop and handling byte for byte, how can I create a
base 0 array from a base 1 array?
-Jerry