Is there a way to create a delegate to get and set values for a FieldInfo?
For properties there are GetGetMethod and GetSetMethod so that I can do: Getter = (Func<S, T>)Delegate.CreateDelegate(typeof(Func<S, T>), propertyInfo.GetGetMethod()); and Setter = (Action<S, T>)Delegate.CreateDelegate(typeof(Action<S, T>), propertyInfo.GetSetMethod()); But how do I go about FieldInfo s? I am not looking for delegates to GetValue and SetValue (which means I will be invoking reflection each time) Getter = s => (T)fieldInfo.GetValue(s); Setter = (s, t) => (T)fieldInfo.SetValue(s, t); but if there is a CreateDelegate approach here? I mean since assignments return a value , can I