CSharp · Console
using System;
public class Program
{
public static void Main()
{
string display = string.Empty;
int[, ] intArray = {{1, 2}, {3, 4}, {5, 6}};
for (int row = 0; row < intArray.GetLength(0); row++)
{
for (int column = 0; column < intArray.GetLength(1); column++)
{
//Console.WriteLine(intArray[row, column]);
// OR
display += intArray[row, column] + " ";
}
display += "\n";
}
Console.WriteLine(display);
}
}