Skip to content

Instantly share code, notes, and snippets.

@jmcd
Created May 8, 2012 15:17
Show Gist options
  • Save jmcd/2636180 to your computer and use it in GitHub Desktop.
Save jmcd/2636180 to your computer and use it in GitHub Desktop.
Making an action expression from a function expresstion
var funcExp = (MyThing x) => x.MyMethod(foo);
var actExp = Expression.Lambda<Action<MyThing>>(funcExp.Body, funcExp.Parameters);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment