I want to get the value of a private member, so I wrote the following:
var f = e.
GetType().
GetFields(System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.DeclaredOnly)[0];
object o = f.FieldType.GetProperty("RowIndex").GetValue(f.FieldType, null);
but the GetValue method needs the source object in the first parameter, and I don't have this object, because I get it at runtime. Can anyone help me ?!
source
share