| layout | page |
|---|---|
| title | CC0011 |
| tagline | RemoveWhereWhenItIsPossibleAnalyzer |
|TypeName|RemoveWhereWhenItIsPossibleAnalyzer | |Check Id | CC0011 | |Category | Performance | |Severity | Warning |
When a linq operator support a predicate parameter it should be used instead of using 'Where' followed by the operator
{% highlight csharp %} var a = new int[10]; var f = a.Where(item => item > 10).First(); {% endhighlight %}
A code fix will be presented to you that will transform the code:
{% highlight csharp %} var a = new int[10]; var f = a.First(item => item > 10); {% endhighlight %}

None
TBD