public static void Print2DDoubleArray(double[,] _2DArray) { if (_2DArray != null) { for (int i = 0; i < _2DArray.GetLength(0); i++) { for (int j = 0; j < _2DArray.GetLength(1); j++) Console.Write(_2DArray[i, j] + "/t"); Console.WriteLine(""); } } } 数组的GetLength(维数)方法,维数从0开始