Fork me on GitHub
TypeName ChangeAnyToAllAnalyzer
Check Id CC0043
Category Refactoring
Severity Hidden

Cause

Changes Any to All or All to Any.

Example

var ints = new[] { 1, 2 }.AsQueryable();
var query = !ints.Any(i => i > 0);

Code fix

A code fix will be presented to you that will transform the code, it will change Any to All or All to Any.

var ints = new[] { 1, 2 }.AsQueryable();
var query = ints.All(i => i <= 0);

Code fix

Related rules

TBD

See also

TBD