Using
List<List<Integer>>
The list itself is not multidimensional, but you can use it to store lists, which can then store integers, acting as a multidimensional array. Then you can access the elements as follows:
// Get the element at index x,y
int element = list[x][y];
To populate the list with source elements x and y:
for (int i=0; i<x; i++)
{
list.Add(new List<Integer>());
for (int j=0; j<y; j++)
{
list[i].Add(someValue);
}
}
Zach source
share