P
Peter Webb
I have a whole lot of methods which look like:
public bool [,] somematrixoperation(bool [,] thismatrix) {}
I want to run this method against multiple bool[,] objects held in an array.
They all have the same size.
What I really want is a one dimensional array of two dimensional arrays.
Something like:
bool [,] [] matrixcollection = new bool [10,10] [5]
Then I can call:
somematrixoperation(matrixcollection); // matrixcollection is a 2D
array
Unfortunately, the notation bool [,] [] defines a jagged array, and not an
1D array of 2D objects as I want.
Is there some other notation that I can use, or some easier approach than
changing my methods to accept 3D arrays instead of 2D arrays?
Thanks
Peter Webb
public bool [,] somematrixoperation(bool [,] thismatrix) {}
I want to run this method against multiple bool[,] objects held in an array.
They all have the same size.
What I really want is a one dimensional array of two dimensional arrays.
Something like:
bool [,] [] matrixcollection = new bool [10,10] [5]
Then I can call:
somematrixoperation(matrixcollection); // matrixcollection is a 2D
array
Unfortunately, the notation bool [,] [] defines a jagged array, and not an
1D array of 2D objects as I want.
Is there some other notation that I can use, or some easier approach than
changing my methods to accept 3D arrays instead of 2D arrays?
Thanks
Peter Webb