object app = new
{
name = "hyt",
age = 18
};

Type t = app.GetType();
var name = t.GetType().GetField("name").GetValue(app);

转载于:https://www.cnblogs.com/ytup/p/5756173.html

更多推荐