Hi I am using a 2dimensional array:
Code:
double[,] matrix = new double[countX, countY];
I need to send every row of this array through a function with definition:
Code:
void ProcessRowOfMatrix(double[] row){ ... }
If I used a jagged [][] array instead of the [,] array this would be easy:

Code:
double[][] matrix = new double[countX][countY];
for(int i=0; i<countX; i++){
  ProcessRowOfMatrix(matrix[i]);
}
With a [,] array I could do it like:
Code:
double[,] matrix = new double[countX,countY];
for(int i=0; i<countX; i++){
  double[] tmpdblarr = new double[countY];
  for(int j=0; j<countY; j++){
    tmpdblarr[j] = matrix[i,j]
  }
  ProcessRowOfMatrix(tmpdblarr);
}
But that's not very elegant... In languages like mathlab rows or colums of 2dimensional arrays can be accesed like:
Code:
double[,] matrix = new double[countX, countY];
for(int i; i<countX;i++){
  ProcessRowOfMatrix(matrix[i,:]);
}
This is very elegant! But it does not work in C# though.

I was wondering maybe there is just another syntax to achieve this also in C#? And maybe somebody can tell me what it is...

Thank you in advance
BramGo