views:

505

answers:

1

What is the difference b/w using FieldInfo.SetValue vs Type.Type.InvokeMember(fieldName, BindingFlags.SetField, ...) ?

+2  A: 

Type.InvokeMember(fieldName, BindingFlags.SetField, ...) internally calls FieldInfo.SetValue, so there are no differences, except additional checks in Type.InvokeMember

Gagarin