W
wolima
I have to create a arraylist of arrays. So, at the end, I have to
convert this arraylist in a two dimmensional array.
I wrote something like this.
ArrayList myAL = new ArrayList();
double[] cvt = new double[3];
cvt[0] = 0.0; cvt[1] = 1.01; cvt[2] = 2.02;
myAL.Add(cvt.Clone());
cvt[0] = 10.0; cvt[1] = 11.11; cvt[2] = 22.22;
myAL.Add(cvt.Clone());
double[] myInt = (double[]) myAL.ToArray(typeof(double[]));
But something is wrong when I convert the arraylist in a two
dimmensional array.
Is there a better way to do that?
What is wrong in the convertion line?
Thanks
convert this arraylist in a two dimmensional array.
I wrote something like this.
ArrayList myAL = new ArrayList();
double[] cvt = new double[3];
cvt[0] = 0.0; cvt[1] = 1.01; cvt[2] = 2.02;
myAL.Add(cvt.Clone());
cvt[0] = 10.0; cvt[1] = 11.11; cvt[2] = 22.22;
myAL.Add(cvt.Clone());
double[] myInt = (double[]) myAL.ToArray(typeof(double[]));
But something is wrong when I convert the arraylist in a two
dimmensional array.
Is there a better way to do that?
What is wrong in the convertion line?
Thanks