Skip to content

Instantly share code, notes, and snippets.

@GraemeF
Created February 16, 2011 20:11
Show Gist options
  • Save GraemeF/830080 to your computer and use it in GitHub Desktop.
Save GraemeF/830080 to your computer and use it in GitHub Desktop.
private static void UpdatePropertyValue<T, TValue>(Expression<Func<T, TValue>> property, T fake, TValue newValue) where T : class
{
property.Compile()(fake).Returns(newValue);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment