Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List crashed when using with string type #43

Open
palenshus opened this issue Sep 11, 2024 · 0 comments
Open

List crashed when using with string type #43

palenshus opened this issue Sep 11, 2024 · 0 comments

Comments

@palenshus
Copy link

palenshus commented Sep 11, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant