how to check if ienummerable is empty code example
Example: check if ienumerable is empty c#
IEnumerable<T> enumerable = new List<int>();
if(!enumerable.Any())
{
throw new InvalidOperationException();
}
IEnumerable<T> enumerable = new List<int>();
if(!enumerable.Any())
{
throw new InvalidOperationException();
}