int[, ] arr = new int[2, 3]{ {1, 2, 3}, {4, 5, 6} }; // 可簡寫為 int[, ] arr = { {1, 2, 3}, {2, 4, 6} }; for (int i = 0; i < arr.GetLength(0); i++) { for (int j = 0; j < arr.GetLength(1); j++) { Console.Write(arr[i, j]); Console.Write("\t"); } Console.WriteLine(); } /* 輸出: 1 2 3 4 5 6 */