Closed Jooty closed 5 years ago
Where(predicate).Any()
will first search through the entire collection, find all items that match the predicate, and then tell you if there's any in that new collection.
Any(predicate
) will stop searching the collection at the first instance of the predicate being true.
It's also a little easier to look at, heh.
@Jooty is correct, List.Any(predicate) is better
I don't really care which is correct. I said I don't understand any of the LINQ topic whatsoever, and you have to wait until @Erlite comes back and reviews to get any further progress.
Hey @Jooty, thanks for your PR! When I first wrote that code, I didn't know Any()
accepted predicates. All looks fine, I'll be rewriting Warframe.NET too later this month. Sorry for the long wait ^^
I don't understand this part, so you'll have to wait on @Erlite, sorry.