Skip to content

List crashed when using with string type #43

Description

@palenshus

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions