When creating an instance of an array, the elements in the array get the default value for this type. So for
T[] array = new T[length];
, i 0 <= i < length array[i] = default(T). , array[i] null. NullReferenceException. Cell ,
HomeArray = new Cell [MAXCOL, MAXROW];
, , Cell, Cell. " , Cell s", " , Cell Cell." , null. HomeArray:
for (int i = 0; i < MAXCOL; i++) {
for (int j = 0; j < MAXROW; j++) {
HomeArray[i, j] = new Cell();
}
}