Example #1
0
        public TextTableRow AppendRow()
        {
            CheckHasColumns();

            var row = new TextTableRow(columns.Count);
            rows.Add(row);

            return row;
        }
Example #2
0
        public TextTableRow AppendRow(params string[] cells)
        {
            CheckHasColumns();

            if (cells.Length > columns.Count)
                throw new ArgumentException("cells", "Number of cells is greater than number of columns.");

            var row = new TextTableRow(columns.Count);
            rows.Add(row);

            for (int i = 0; i < cells.Length; i++)
                row.Cells[i].Contents = cells[i];

            return row;
        }