I am wanting to create a 2d array to produce a grid of int values the size of the grid needs to be 100 * 100
Example Grid
1 2 3 .........100
101 102 103.........200
201 202 303.........300
I produced ths
int rows = 100;
int columns = 100;
public int[,] InitIntArray() {
int[,] grid = new int[rows,columns];
int number = 1;
for (int i = 0; i != rows; i++)
{
for (int j = 0; j != columns; j++)
grid[i, j] = number;
number++;
}
return grid;
}
When I use my code everything seems to work fine until I try to access the columns. all I get when I use grid.getValue() is 1.