Skip to content

Instantly share code, notes, and snippets.

@goloroden
Created December 16, 2011 12:59
Show Gist options
  • Save goloroden/1485958 to your computer and use it in GitHub Desktop.
Save goloroden/1485958 to your computer and use it in GitHub Desktop.
Combining Funcs
Func<User, bool> whereStatus = u => u.Status == status;
Func<User, bool> whereQuery =
u => u.Lastname.Contains(q) || u.Firstname.Contains(q) || u.UserId.Contains(q);
Func<User, bool> where = ...?
// What's requires: where = whereStatus && whereQuery
@forki
Copy link

forki commented Dec 18, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment