WFCD / Warframe.NET

Under rewrite: Collection of Warframe libraries for C# developers.
MIT License
22 stars 8 forks source link

Cleaned up client LINQs. #6

Closed Jooty closed 5 years ago

TobiTenno commented 6 years ago

I don't understand this part, so you'll have to wait on @Erlite, sorry.

Jooty commented 6 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.

Khaoz-Topsy commented 6 years ago

@Jooty is correct, List.Any(predicate) is better

TobiTenno commented 6 years ago

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.

Erlite commented 5 years ago

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 ^^