M
Michael Howes
I have many double[] that each have a few thousand numbers in them.
I need to concatenate groups of these double arrays into a new set of
double[].
I don't know the total # of points.
I thought it would be fairly easy to add these different double arrays
to different ArrayLists and then use ToArray to get all the numbers back
in one array. Sort of a cheap concatenate so I don't need to loop
through all the points or keep newing larger arrays
when I call ToArray
(double[])yData.ToArray(typeof(double))
I get an exception; "At least one element in the source array could
not be cast down to the destination array type."
Umm..they were all valid doubles in arrays of doubles before being
added to the ArrayList
any ideas what this might be?
thanks
mike
I need to concatenate groups of these double arrays into a new set of
double[].
I don't know the total # of points.
I thought it would be fairly easy to add these different double arrays
to different ArrayLists and then use ToArray to get all the numbers back
in one array. Sort of a cheap concatenate so I don't need to loop
through all the points or keep newing larger arrays
when I call ToArray
(double[])yData.ToArray(typeof(double))
I get an exception; "At least one element in the source array could
not be cast down to the destination array type."
Umm..they were all valid doubles in arrays of doubles before being
added to the ArrayList
any ideas what this might be?
thanks
mike