CodeRush Classic shows the Lambda expression cannot have 'params' parameter code issue if a lambda expression has a params parameter.
Remove the params keyword from the lambda expression.
Highlights the lambda expressions, which would cause compilation errors due to the use of the params keyword.
Func<string[], string> GetLongestItem = (params string[] <-:caret:->strings) => { string result = string.Empty; foreach (string str in strings) if (str.Length > result.Length) result = str; return result; };
Fix:
Func<string[], string> GetLongestItem = strings =>; { string result = string.Empty; foreach (string str in strings) if (str.Length > result.Length) result = str; return result; };