diff --git a/src/Aardvark.Base/Extensions/IEnumerableExtensions.cs b/src/Aardvark.Base/Extensions/IEnumerableExtensions.cs index 64c98cdf..e8439ceb 100644 --- a/src/Aardvark.Base/Extensions/IEnumerableExtensions.cs +++ b/src/Aardvark.Base/Extensions/IEnumerableExtensions.cs @@ -876,14 +876,13 @@ public static bool AllEqual(this IEnumerable elements) #region Comparisons /// - /// Implemented in System.Interactive.dll. /// Returns true if elements contains no items or if elements is null, /// false otherwise. /// public static bool IsEmptyOrNull(this IEnumerable elements) { if (elements == null) return true; - return elements.Take(1).Count() == 0; + return !elements.Any(); // will check for ICollection internally } public static IEnumerable NonNull(IEnumerable elements)