I need to make 2d array of arrays.
int[,][] array = new int[n,m][];
for (int i=0; i< m; i++)
{
for (int j=0; j< n; j++)
{
int r = ran.Next(1, 7);
int[] arraybuf = new int[r];
for (int z = 0; z < r; z++)
{
arraybuf[z] = 1;
}
array[i, j] = arraybuf;
Console.WriteLine(array[i, j]);
}
Console.WriteLine();
}
When i'm doing this, console shows
System.Int32[]
in every place where array must be.
Console.WriteLine(array[i, j]);to print? You've given it an array of int, and there's no special overload of WriteLine() to print those.