Пример #1
0
        private static string ToStringTable(string[,] cells, IReadOnlyList <int> columnWidths)
        {
            var tableBuilder = new StringBuilder();

            var width  = cells.GetLength(1);
            var height = cells.GetLength(0);

            tableBuilder.AddHeaderRow(cells, columnWidths, width);
            tableBuilder.AddSeparatorRow(columnWidths, width);
            tableBuilder.AddDataRows(cells, columnWidths, height, width);

            return(tableBuilder.ToString());
        }