roslynator
roslynator copied to clipboard
RCS1077 with temporary variable
trafficstars
Product and Version Used: v2.9.0
RCS1077: Optimize LINQ method call is not applied in some cases, i.e. when a variable could be inlined.
Code with Diagnostic:
int count = enumerable.Count();
if (count == 0)
{
return null;
}
Code with Fix:
if (!enumerable.Any())
{
return null;
}