JetBrains Rider 2024.3 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.

JetBrains Rider suggests removing the redundant parentheses to improve code readability:

Func<string, Type> t = (x) => x.GetType();
Func<string, Type> t = x => x.GetType();
Last modified: 08 April 2024