OK: it specifies that this is a two dimensional array.
object[] ar = new object[5];
creates an array of 5 objects - this is a one dimensional array because to access it you only need to provide one coordinate, or
index
:
object o1 = ar[0];
object o2 = ar[1];
object o3 = ar[2];
object o4 = ar[3];
object o5 = ar[4];
When you add a comma, you create a two dimensional array:
object[,] ar = new object[3, 5];
This creates an array of 15 objects - three rows by five columns - and it requires two coordinates or
indexes
to access:
object o1 = ar[0, 0];
object o2 = ar[0, 1];
object o3 = ar[0, 2];
object o4 = ar[0, 3];
object o5 = ar[0, 4];
object o6 = ar[1, 0];
object o7 = ar[1, 1];
object o8 = ar[1, 2];
object o9 = ar[1, 3];
object o10 = ar[1, 4];
object o11 = ar[2, 0];
object o12 = ar[2, 1];
object o13 = ar[2, 2];
object o14 = ar[2, 3];
object o15 = ar[2, 4];
There is also a Jagged array, where the number of columns for each row are not the same:
object[][] ar = new object[3];
ar[0] = new object[5];
ar[1] = new object[2];
ar[2] = new object[1024];
Again, this requires to indexes, but this time you have to be a lot more carefull!
object 01 = ar[0][3];
is fine, but
object o1 = ar[1][3];
will give you an error because the second row does not contain enough elements!