TypeName | CallExtensionMethodAsExtensionAnalyzer |
Check Id | CC0026 |
Category | Usage |
Severity | Info |
You can simplify a call to some static methods by using their Extension method implementation.
public void Bar()
{
var source = new int[] { 1, 2, 3 };
Enumerable.Any(source, x => x > 1);
}
A code fix will be presented to you that will transform the code:
public void Bar()
{
var source = new int[] { 1, 2, 3 };
source.Any(x => x > 1);
}
None
TBD