I have an array of the length m*n, that stores a list of double element.
How to convert it into a matrix of m*n?
This is the method signature.
//returns a matrix of [m,n], given arr is of length m*n
static double[,] ConvertMatrix(Array arr, int m, int n)
{
}
You can use
Buffer.BlockCopyto do this very efficiently: