gistlib
main.csint[,] array2D = new int[3, 3] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; for (int i = 0; i < array2D.GetLength(0); i++) { for (int j = 0; j < array2D.GetLength(1); j++) { Console.WriteLine("Value at ({0}, {1}): {2}", i, j, array2D[i, j]); } } 265 chars10 lines
int[,] array2D = new int[3, 3] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; for (int i = 0; i < array2D.GetLength(0); i++) { for (int j = 0; j < array2D.GetLength(1); j++) { Console.WriteLine("Value at ({0}, {1}): {2}", i, j, array2D[i, j]); } }
gistlibby LogSnag