Skip to content

Instantly share code, notes, and snippets.

@davidbreyer
Created October 23, 2019 14:09
Show Gist options
  • Save davidbreyer/7bf3e47e1d155863f084448126584923 to your computer and use it in GitHub Desktop.
Save davidbreyer/7bf3e47e1d155863f084448126584923 to your computer and use it in GitHub Desktop.
public static bool None<TSource>(this IEnumerable<TSource> source)
{
return !source.Any();
}
public static bool None<TSource>(this IEnumerable<TSource> source,
Func<TSource, bool> predicate)
{
return !source.Any(predicate);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment