LINQ .Any VS .Exists - What's the difference?
Asked 07 September, 2021
Viewed 2K times
  • 55
Votes

Using LINQ on collections, what is the difference between the following lines of code?

if(!coll.Any(i => i.Value))

and

if(!coll.Exists(i => i.Value))

Update 1

When I disassemble .Exists it looks like there is no code.

Update 2

Anyone know why there is no code there for this one?

6 Answer