KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I love string.IsNullOrEmpty method. I'd love to have something that would allow the same functionality for IEnumerable. Is there such? Maybe some collection helper class? The reason I am asking is that in if statements the code looks cluttered if the patter is (mylist != null && mylist.Any()) . It would be much cleaner to have Foo.IsAny(myList) . This post doesn't give that answer: IEnumerable is empty? .
Tags (comma-separated)
Save Edits
Cancel