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