我想获得私人成员的价值,所以我写了以下内容:
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);
但是方法“GetValue”需要第一个参数中的原始对象,而我没有这个对象,因为我进入运行时。谁能帮帮我?!