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