Skip to content

Instantly share code, notes, and snippets.

@apiguy
Created May 25, 2010 03:34
Show Gist options
  • Save apiguy/412725 to your computer and use it in GitHub Desktop.
Save apiguy/412725 to your computer and use it in GitHub Desktop.
public static Func<T, bool> BuildEqFuncFor<T>(string prop, object val)
{
return t => t.GetType().InvokeMember(
prop, BindingFlags.GetProperty, null, t, null) == val;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment