Skip to content

Release v2.1.0

Choose a tag to compare

@github-actions github-actions released this 15 Jan 22:29
· 19 commits to master since this release
2691548

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