Type t = typeof(classA); t.GetProperty("Aa").GetValue(b, null); System.Reflection.MemberInfo[] info = t.GetProperties(); foreach (System.Reflection.MemberInfo i in info) { a += i.Name + " "; } COMMON.Message.Show(this, a);
利用反射得出某个类的所有属性
最新推荐文章于 2021-02-13 05:44:38 发布