📅  最后修改于: 2022-03-11 14:48:47.602000             🧑  作者: Mango
Type myType = myObject.GetType();
IList props = new List(myType.GetProperties());
foreach (PropertyInfo prop in props)
{
object propValue = prop.GetValue(myObject, null);
// Do something with propValue
}