- Changed to use `Count()` method once for a local variable.
Then, we do not have to be worried about CA1827.
- To fix the build warning, it could replace `Count()` method with `Any()` method
https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1827
- But, to improve performance as a review, use `Count()` itself.
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
}
var rest = lhs.stateList.Except(rhs.stateList);
+ var count = rest.Count();
- if (rest.Count() == 0)
+ if (count == 0)
{
return Normal;
}
- if (rest.Count() == 1)
+ if (count == 1)
{
return rest.First();
}