ConsoleTables 2.6.2

dotnet add package ConsoleTables --version 2.6.2                
NuGet\Install-Package ConsoleTables -Version 2.6.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ConsoleTables" Version="2.6.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConsoleTables --version 2.6.2                
#r "nuget: ConsoleTables, 2.6.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ConsoleTables as a Cake Addin
#addin nuget:?package=ConsoleTables&version=2.6.2

// Install ConsoleTables as a Cake Tool
#tool nuget:?package=ConsoleTables&version=2.6.2                

ConsoleTable

Have you ever just wanted to output flat structured POCO out to console? Sure you have! This class will let you print a nicely formatted table right to your console as easily as possible.

Example usage

// using ConsoleTables;
static void Main(String[] args)
{
    var table = new ConsoleTable("one", "two", "three");
    table.AddRow(1, 2, 3)
         .AddRow("this line should be longer", "yes it is", "oh");

    table.Write();
    Console.WriteLine();

    var rows = Enumerable.Repeat(new Something(), 10);

    ConsoleTable
        .From<Something>(rows)
        .Configure(o => o.NumberAlignment = Alignment.Right)
        .Write(Format.Alternative);

    Console.ReadKey();
}

Console output


FORMAT: Default:

 --------------------------------------------------
 | one                        | two       | three |
 --------------------------------------------------
 | 1                          | 2         | 3     |
 --------------------------------------------------
 | this line should be longer | yes it is | oh    |
 --------------------------------------------------

 Count: 2


FORMAT: Alternative:

+----------------------------+-----------+-------+
| one                        | two       | three |
+----------------------------+-----------+-------+
| 1                          | 2         | 3     |
+----------------------------+-----------+-------+
| this line should be longer | yes it is | oh    |
+----------------------------+-----------+-------+

FORMAT: Minimal:

one                         two        three
--------------------------------------------
1                           2          3
this line should be longer  yes it is  oh

Sample Output (Screenshot)

screenshot

Adding it to your project with nuget

Package Manager

Install-Package ConsoleTables -Version 2.4.2

.NET CLI

dotnet add package ConsoleTables --version 2.4.2

PackageReference

<PackageReference Include="ConsoleTables" Version="2.4.2" />

Packet CLI

paket add ConsoleTables --version 2.4.2

Version History

Version Downloads Last updated
Version Downloads Last updated
2.4.2 18,202 4 months ago
2.4.1 42,442 7 months ago
2.4.0 19,443 12/18/2019
2.3.0 107,954 3/20/2019
2.2.4 678 3/6/2019

The MIT License (MIT)

Copyright (c) 2013 Khalid Abuhakmeh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

NuGet packages (30)

Showing the top 5 NuGet packages that depend on ConsoleTables:

Package Downloads
NBomber

Modern and flexible load testing framework for Pull and Push scenarios, designed to test any system regardless a protocol (HTTP/WebSockets/AMQP etc) or a semantic model (Pull/Push).

Network

Network library supporting: TCP, UDP, RSA, events and objects. Fast and simple, with only 48bit overhead per packet. Send and receive packets with async operations. Examples at: https://www.indie-dev.at/overview-en/ Documentation at: https://www.indie-dev.at/NetworkLib/HelpFile_6.2.5.21/ Fork me: https://github.com/Toemsel/Network

Extensions.Pack

A set of useful extensions to make your code smooth and nice readable.

Frank.Libraries.Extensions

Simply a bunch of extension methods that might help any developer

AspNetCore.Simple.MsTest.Sdk

A simple sdk to write easy and fast tests for your web api's

GitHub repositories (16)

Showing the top 5 popular GitHub repositories that depend on ConsoleTables:

Repository Stars
Squidex/squidex
Headless CMS and Content Managment Hub
OpenSAGE/OpenSAGE
OpenSAGE is a free, open source re-implementation of SAGE, the 3D real time strategy (RTS) engine used in Command & Conquer: Generals and other RTS titles from EA Pacific. Written in C#. Not affiliated with EA.
jeremytammik/RevitLookup
Interactive Revit RFA and RVT project database exploration tool to view and navigate BIM element parameters, properties and relationships.
Flangvik/TeamFiltration
TeamFiltration is a cross-platform framework for enumerating, spraying, exfiltrating, and backdooring O365 AAD accounts
bitfaster/BitFaster.Caching
High performance, thread-safe in-memory caching primitives for .NET
Version Downloads Last updated
2.6.2 45,874 9/25/2024
2.6.1 340,054 10/27/2023
2.6.0 946 10/27/2023
2.5.0 79,028 7/27/2023
2.4.2 3,793,771 6/25/2020
2.4.1 313,005 3/9/2020
2.4.0 77,370 12/18/2019
2.3.0 320,419 3/20/2019
2.2.4 2,242 3/6/2019
2.2.0 119,869 3/30/2018
2.2.0-alpha.0 136 7/27/2023
2.1.0 71,980 12/20/2016
2.0.0 2,621 12/20/2016
1.1.2 17,907 6/23/2016
1.1.1 2,413 6/21/2016
1.1.0 8,076 4/19/2016
1.0.0 4,471 7/10/2014

Add AppVeyor build and MinVer versioning