check if ienumerable is empty csharp

Code Example - check if ienumerable is empty csharp

                
                        IEnumerable<T> enumerable = new List<int>();

if(!enumerable.Any())
{
  throw new InvalidOperationException();
}