private static int GetMaxSizeForItem(string[,] intermediate) { var rowMax = intermediate.RowUpperBound(); var colMax = intermediate.ColumnUpperBound(); var max = 0; for (var row = 0; row <= rowMax; row++) { for (var col = 0; col <= colMax; col++) { max = GetMaxLength(intermediate[row, col], max); } } return(max); }
private static string PrintRow(string[,] intermediate, List <string> yAxis, int row, int axisLength, int itemLength) { var toPrint = PrintItem(yAxis[row], axisLength, true) + "|"; var sb = new StringBuilder(); sb.Append(toPrint); var colMax = intermediate.ColumnUpperBound(); for (int col = 0; col <= colMax; col++) { var item = intermediate[row, col]; toPrint = PrintItem(item, itemLength, true); sb.Append(toPrint); } return(sb.ToString()); }