Skip to content

Instantly share code, notes, and snippets.

@juanplopes
Created January 11, 2011 15:46
Show Gist options
  • Save juanplopes/774584 to your computer and use it in GitHub Desktop.
Save juanplopes/774584 to your computer and use it in GitHub Desktop.
var foo = Expression.Parameter(typeof(Foo));
var value = Expression.Parameter(typeof(int));
var propA_set = Expression.Lambda<Action<Foo, int>>(
Expression.Assign(Expression.Property(foo, propA), value),
foo, value).Compile();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment