Release v2.1.0
V2.1.0
New Properties
| Property | Type | Default | Description |
|---|---|---|---|
ShowBorders |
bool |
true |
When false, the table is drawn without borders for a more minimalist style |
using ConsoleTable.Text;
// Setup the table
var table = new Table
{
ShowBorders = false
};
// Set headers
table.SetHeaders("Name", "Age", "City");
// Add rows
table.AddRow("Alice Cooper", "30", "New York");
table.AddRows(new string[][]
{
new string[] { "Bob", "25", "Los Angeles" },
new string[] { "Charlie Brown", "47", "Chicago" }
});
// Set footers
table.SetFooters("Total: 3", "Total Age: 102");
// Display the table
Console.WriteLine(table.ToTable());Output:
Name Age City
Alice Cooper 30 New York
Bob 25 Los Angeles
Charlie Brown 47 Chicago
Total: 3 Total Age: 102