check if ienumerable is empty visual basic 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();
}