feat: Array.IsNotNullAndNotEmpty
This commit is contained in:
parent
b59f83991e
commit
bf89a30ef7
1 changed files with 4 additions and 0 deletions
|
|
@ -37,4 +37,8 @@ public static class ListExtensions
|
|||
/// <returns>Whether the list contains elements and is not null</returns>
|
||||
public static bool IsNotNullAndNotEmpty<T>(this IEnumerable<T>? obj)
|
||||
=> obj is not null && obj.Any();
|
||||
|
||||
/// <inheritdoc cref="ListExtensions.IsNotNullAndNotEmpty{T}(IEnumerable{T}?)"/>
|
||||
public static bool IsNotNullAndNotEmpty<T>(this T[]? obj)
|
||||
=> obj is not null && obj.Any();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue