string[][] xinxi = new string[3][];
xinxi[0] = new string[] { "姓名", "口頭禪", "籍貫" };
xinxi[1] = new string[] { "劉大夫", "很是費勁", "《一日一囧》" };
xinxi[2] = new string[2];
xinxi[2][0] = "蠟筆小新";
xinxi[2][1] = "老婆!";
// 雙重 foreach 遍歷
foreach (string[] hang in xinxi)
{
foreach (string lie in hang)
Console.Write(lie);
Console.WriteLine();
}

for (int i = 0; i < xinxi.Length; i++)
{
for (int j = 0; j < xinxi[i].Length; j++)
{
if (xinxi[i][j] != null) Console.Write(xinxi[i][j]);
else Console.Write("-------");
}
Console.WriteLine();
}
若第 3 行宣告為 new string[3],未賦值元素會以 null 佔位,輸出會顯示 "-------"。交錯陣列則不存在該位置,不會輸出佔位符。這反映記憶體配置差異:矩形陣列連續配置,交錯陣列各行獨立配置。