获得
PropertyInfo(from
GetProperty)之后,您需要调用
GetValue并传入要从中获取值的实例。在您的情况下:
d.GetType().GetProperty("value2").GetValue(d, null);
欢迎分享,转载请注明来源:内存溢出
获得
PropertyInfo(from
GetProperty)之后,您需要调用
GetValue并传入要从中获取值的实例。在您的情况下:
d.GetType().GetProperty("value2").GetValue(d, null);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)