IsNullOrEmpty

public static bool IsNullOrEmpty(this IEnumerable iEnumerable)
{
    if (iEnumerable != null)
    {
        return !iEnumerable.GetEnumerator().MoveNext();
    }
    return true;
}
Example:
List<string> list = new List<string>();
Console.WriteLine(list.IsNullOrEmpty());

Description

Indicates whether the specified IEnumerable collection is null or empty

Details

Double click on the code to select all.

 

;