Added IsNotNullAndNotEmpty
This commit is contained in:
parent
bdffd405f8
commit
2ef5f0bc9a
1 changed files with 5 additions and 0 deletions
|
|
@ -23,6 +23,11 @@ public static class UniversalExtensions
|
||||||
return obj.ElementAt(rng) ?? throw new ArgumentNullException();
|
return obj.ElementAt(rng) ?? throw new ArgumentNullException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsNotNullAndNotEmpty<T>(this IEnumerable<T> obj)
|
||||||
|
{
|
||||||
|
return obj is not null && obj.Any();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the current CPU Usage on all plattforms
|
/// Get the current CPU Usage on all plattforms
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue