I'm with Damien. The problem should be newObjectList because there is no problem passing the List of generic type to SetValue, since it takes two arguments of type Object
public void SetValue(
Object obj,
Object value
)
If you create a new list and fill it with another collection, it will ask for IEnumerable, so you should try something like
field.SetValue(obj, new List<T>(newObjectList as IEnumerable<T>));
At least during compilation it will not cause errors
source
share