Skip to content
Discussion options

You must be logged in to vote

Lambdas do support params. The issue with your code is that you are assigning the lambda to a delegate which is not declared with params, thus that modifier is lost.

var f = (params int[] data) =>
{
	foreach (var x in data)
		Console.WriteLine(x);
};

f(1, 2, 3); // ok

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by suugbut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants