public static void Set( this object instance, PropertyInfo p, object newValue) { GetSetterFor(instance.GetType(), p)(instance, newValue); }
public static T Set <T, TProperty>( this T instance, Expression <Func <T, TProperty> > propExpression, TProperty newValue) where T : class { GetSetterFor(propExpression)(instance, newValue); return(instance); }