In C, in array say A[2][3]
rightmost index change resulted in a smallest memory address shift, i.e. elements were located in memory as A[0][0], A[0][1]...
Is same is true for rectangular arrays in .NET? If we have, say array a[2, 3]
are elements located in memory as a[0, 0], a[0, 1]...
?
The CLI specification, section 8.9.1, states:
So the answer is yes -- you will first encounter all elements of the first row, then all elements of the second row, etc (as the spec says, this is called row-major order).