In C#, using Linq, if I want to check if a collection has any elements, I can do this:
someCollection.Any()
which is preferable over
someCollection.Count() > 0
since the latter will count all the items in the collection, when I don't really care how many items there are, I just want to know if there are any.
Is there an equivalent for checking if a collection has more than one item? Something like:
someCollection.Many()
instead of having to do
someCollection.Count() > 1
Silly question, I know, and from my research, it doesn't look like there is. But since it's something I use frequently, I thought I'd double check with the community.
Thanks