IEnumerable<TSource> empty returns as null 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();
}