roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS1077 for Intersect and Except

Open bricelam opened this issue 1 year ago • 0 comments
trafficstars

RCS1077 should recommend replacing these patterns:

a.Where(b => c.Contains(b));
x.Where(y => !z.Contains(y));

With these instead:

a.Intersect(c);
x.Except(z);

In LINQ-to-objects this will remove nested loops resulting in better perf.

bricelam avatar Jul 10 '24 19:07 bricelam