Le Minh wrote:
In Visual C++ we use double **m_domimage[4]; for 3dimension array which
has one fix length.
How do we use this method in C#?
private double[][][] dominage = new double[ 4 ][][];
That being an array of an array of an array of doubles.
With the new operator, you fix the first dimension on 4 in this case.
When using, you will do things like:
dominage[ 0 ] = new double[ 5 ][];
dominage[ 0 ][ 0 ] = new double[ 6 ];
dominage[ 0 ][ 0 ][ 0 ] = Math.PI;
etc.
If you want a fixed 3D matrix, then you would declare as:
private double[ , , ] dom = new double[ 4, 5, 6 ];
This is obviously a 4x5x6 matrix.
Or any combination of the above.
Have fun. :)
David
Note: I used "dominage" as name, instead of "m_dominage". The first is
C# convention (camel case for private data members), the latter C++
convention.