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 IList 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 IList<T> source)
Examples
Replace
collection == null || collection.Count == 0
with
collection.IsNullOrEmpty()
Type Parameters
Name | Description |
---|---|
T | the item type |
Parameters
Name | Type | Description |
---|---|---|
source | IList |
the collection |
Return Value
Type | Description |
---|---|
bool | true if element null or empty, else false |