Click or drag to resize

ConsoleUtilsWriteTable Method

Writes the specified table to the standard output stream

Namespace:  Cauldron.Consoles
Assembly:  Cauldron.Consoles (in Cauldron.Consoles.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static void WriteTable(
	params ConsoleTableColumn[] columns
)

Parameters

columns
Type: Cauldron.ConsolesConsoleTableColumn
The table to write
Examples
var type = instance.GetType();
var properties = type.GetPropertiesEx(BindingFlags.Public | BindingFlags.Instance);

ConsoleUtils.WriteTable(
    new ConsoleTableColumn(properties.Select(x => x.Name)),
    new ConsoleTableColumn(properties.Select(x => x.GetValue(instance)?.ToString())));
See Also