using System.Collections.Generic;
public static void Main()
var test = new List<string>();
Console.WriteLine(IsEmpty(test));
public static bool IsEmpty(object source)
var sourceType = source.GetType();
if (typeof(IEnumerable<>).IsAssignableFrom(sourceType))
var childType = sourceType.GetGenericArguments()[0];
MethodInfo isAny = typeof(System.Linq.Enumerable)
.First(t => t.Name == nameof(System.Linq.Enumerable.Any) && t.IsGenericMethod)
.MakeGenericMethod(new Type[]{ childType });
if ((bool)isAny.Invoke(null, new object[] { source }))