Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.25 KB

RR0116.md

File metadata and controls

52 lines (37 loc) · 1.25 KB

Invert LINQ method call

Property Value
Id RR0116
Title Invert LINQ method call
Syntax System.Linq.Enumerable.Any(Func<T, bool>) or System.Linq.Enumerable.All(Func<T, bool>)
Span method name
Enabled by Default

Usage

Before

if (items.Any(predicate))
{
}

After

if (items.All(!predicate))
{
}

Before

if (items.All(predicate))
{
}

After

if (items.Any(!predicate))
{
}

See Also

(Generated with DotMarkdown)