We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic implementation:
using System.Collections.Generic; using System.Linq; namespace R7.Dnn.UserHtml.Models { public static class EnumerableExtensions { public static bool IsNullOrEmpty<T> (this IEnumerable<T> source) => source == null || !source.Any (); } }
More advanced implementation would contain ICollection<T>.Count checks for better performance. Example: http://blog.vkuznetsov.ru/posts/2011/08/31/csharp-ienumerable-isnullorempty
ICollection<T>.Count
The text was updated successfully, but these errors were encountered:
8a13cd1
No branches or pull requests
Basic implementation:
More advanced implementation would contain
ICollection<T>.Count
checks for better performance. Example: http://blog.vkuznetsov.ru/posts/2011/08/31/csharp-ienumerable-isnulloremptyThe text was updated successfully, but these errors were encountered: