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