Hacker News new | ask | show | jobs
by clappski 1563 days ago
Wouldn't `Count` ( https://docs.microsoft.com/en-us/dotnet/api/system.collectio... ) be the preferred way to check if a collection has values? `someCollection.Any()` is the same as Python's `any`
1 comments

I didn't mean specifically ICollection, maybe I just used the wrong word (probably "enumerable" or "sequence" is better?). But I was referring to this method: https://docs.microsoft.com/en-us/dotnet/api/system.linq.enum...

> Determines whether any element of a sequence exists or satisfies a condition.