Fork me on GitHub
TypeName ConvertLambdaExpressionToMethodGroupAnalyzer
Check Id CC0020
Category Style
Severity Hidden

Cause

The extra unnecessary layer of indirection induced by the lambda expression may be avoided by passing the method group instead.

Example

var f = a.Where(item => filter(item));

Code fix

A code fix will be presented to you that will transform the code:

var f = a.Where(filter);

Code fix

Related rules

None

See also

TBD