This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Incubator.
Summary
Checks whether specified IEnumerable is null or contains no elements
- Assembly
- Cake
.Incubator .dll - Namespace
- Cake
.Incubator . Enumerable Extensions - Containing Type
- EnumerableExtensions
Syntax
public static bool IsNullOrEmpty<T>(this IEnumerable<T> source)
Examples
Replace
collection == null || !collection.Any()
with
collection.IsNullOrEmpty()
Type Parameters
Name | Description |
---|---|
T | the item type |
Parameters
Name | Type | Description |
---|---|---|
source | IEnumerable |
the collection |
Return Value
Type | Description |
---|---|
bool | true if element null or empty, else false |