jpierson / to-markdown-table

Extension method for generating text output in Markdown table format.
MIT License
21 stars 2 forks source link

ToMarkdownTable

An extension method for transforming tabular data into plain text in Markdown table representation.

Usage

C#: Transform an array to a Markdown table:

var list = new[]
{
    new { Username = "Falcore", Score = 1293, },
    new { Username = "Dunsby", Score = 2342, },
    new { Username = "Habisham", Score = 5234, },
};

var markdownTable = list.ToMarkdownTable();

Console.WriteLine(markdownTable);
Username Score
Falcore 1293
Dunsby 2342
Habisham 5234

Getting started

You can install ToMarkdownTable using NuGet.

PM> Install-Package ToMarkdownTable

References