You're going to have to copy them in a loop. I threw together this function
which should make it a simple task.
public void CopyToArray(double[] sourceArray, double[,] destinationArray,
int destinationArrayIndex)
{
Debug.Assert(sourceArray.Length == destinationArray.GetLength(1)); //
make sure the to/from arrays are the same length
for (int i=0; i<sourceArray.Length; i++)
{
destinationArray[destinationArrayIndex, i] = sourceArray[i];
}
}
And in your case, you would call it like this:
CopyToArray(myMethod1(), myArray, 0);
ShaneB
"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m...
Hi,
I have a two dimensional array as follows:
double[,] myArray = new double[14, 41];
Now I have a method which is returning double[], which is of size 41.
I need to put the data of the array returned into myArray.
myArray[0, ???] = myMethod1(); // return double[41]
myArray[1, ???] = myMethod2(); // return double[41]
etc
I hope someone understands my problem and can help me out.
Thanks in Advance