public static string GetASCIImatrix(Matrix2d matrix) { string text = string.Empty; List <string> rows = new List <string>(); for (int j = matrix.GetLengthY() - 1; j >= 0; j--) { string[] line = new string[matrix.GetLengthX()]; for (int i = 0; i < matrix.GetLengthX(); i++) { line[i] = matrix[i, j]; } rows.Add(String.Join(",", line)); } text = String.Join("\n", rows) + "\n"; return(text); }