Given the following class:
class TestClass {
public void SetValue(int value) { Value = value; }
public int Value { get; set; }
}
I can
Properties are really wrappers around methods in .Net, so using reflection you should be able to get the delegate (set_PROPERTY and get_PROPERTY) and then execute them...
See System.Reflection.PropertyInfo
If has two methods which you can use to get/ set the value - GetGetMethod and GetSetMethod.
So you could write:
var propertyInfo = typeof (TestClass).GetProperty ("Value");
var setMethod = property.GetSetMethod (); // This will return a MethodInfo class.