C# using properties with value types with Delegate.CreateDelegate
问题 Using Jon Skeet's article Making reflection fly and exploring delegates as a guide, I am trying to use the Delegate.CreateDelegate method to duplicate properties as delegates. Here's an example class: public class PropertyGetter { public int Prop1 {get;set;} public string Prop2 {get;set;} public object GetPropValue(string propertyName) { var property = GetType().GetProperty(propertyName).GetGetMethod(); propertyDelegate = (Func<object>)Delegate.CreateDelegate(typeof(Func<object>), this,