ReSharper 2017.1 Help

Code Inspection: Redundant lambda signature parentheses

If a lambda expression has a single, implicitly typed parameter, parentheses are optional. They are necessary if there are two or more parameters.

ReSharper suggests removing the redundant parentheses to improve code readability:

Suboptimal codeAfter the quick-fix
Func<string, Type> t = (x) => x.GetType();
Func<string, Type> t = x => x.GetType();

See Also

Last modified: 4 July 2017