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