Я люблю
Код: Выделить всё
string.IsNullOrEmpty
Код: Выделить всё
if
Код: Выделить всё
(mylist != null && mylist.Any())
Код: Выделить всё
Foo.IsAny(myList)
This post doesn't give that answer: IEnumerable is empty?.
Источник: https://stackoverflow.com/questions/504 ... l-or-empty