public static void Matrix(int[,] a, int nrow, int ncol)
{
for (int i = 0; i < nrow; i++)
{
Console.Write("\n");
for (int j = 0; j < ncol; j++)
{
a[i,j] = i + 2 * j;
Console.Write("{0,4}", a[i,j]);
}
}
}
private static void Main()
{
const int nrow = 10;
const int ncol = 12;
int[,] b = new int[nrow, ncol];
Matrix(b[nrow, ncol]);
Console.Write("");
}