📅  最后修改于: 2022-03-11 14:49:03.209000             🧑  作者: Mango
var nameOfProperty = "property1";
var propertyInfo = myObject.GetType().GetProperty(nameOfProperty);
var value = propertyInfo.GetValue(myObject, null);