ConsoleTableExt
ConsoleTableExt copied to clipboard
List crashed when using with string type
Appears to be similar or same as the now-closed #25, I reproed on version 3.3. Running this
var tableData = new List<List<string>> // If I change string to object it works
{
new() { "Sakura Yamamoto", "Support Engineer", "London", 46.ToString(), ""},
new() { "Serge Baldwin", "Data Coordinator", "San Francisco", 28.ToString(), "something else" },
new() { "Shad Decker", "Regional Director", "Edinburgh", "", ""},
};
ConsoleTableBuilder
.From(tableData)
.WithColumn("Name","Role","City","Age","Notes")
.WithFormat(ConsoleTableBuilderFormat.Minimal)
.ExportAndWriteLine();
results in
System.Reflection.TargetParameterCountException: Parameter count mismatch.
at System.Reflection.MethodBaseInvoker.ThrowTargetParameterCountException()
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.PropertyInfo.GetValue(Object obj)
at ConsoleTableExt.ConsoleTableBuilder.From[T](List`1 list)