///obj 实体
///property 属性名称
public static object get(object obj, string property) {
return obj.GetType().InvokeMember(property, System.Reflection.BindingFlags.GetProperty, null, obj, null);
}
方法二propertys = obj.GetType().GetProperty(property );
if (propertys != null)
return propertys.GetValue(obj, null);
else
throw new Exception(obj.GetType().FullName + "没有此属性" + ps[index]);