Index out of range exception in 2D Array (C#) -
char[,] map = new char[10, 20]; (int = 0; < map.getlength(0); i++) { (int j = 0; < map.getlength(1); j++) { map[i, j] = '.'; } }
i want make elements of map[i,j] point , when try run compiler says: index out of range exception. maybe it's stupid question had ask it.
see i
in j-loop
for (int j = 0; j < map.getlength(1); j++)
Comments
Post a Comment