Skip to content

Instantly share code, notes, and snippets.

@caseywatson
Created March 14, 2015 21:55
Show Gist options
  • Save caseywatson/08e90ed6edccb5842af6 to your computer and use it in GitHub Desktop.
Save caseywatson/08e90ed6edccb5842af6 to your computer and use it in GitHub Desktop.
None Extension Method
public static bool None<T>(this IEnumerable<T> source, Func<T, bool> condition = null)
{
return (source.Any(condition ?? (t => true)) == false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment