Type type = obj.GetType();//获取类的类型 MethodInfo[] infos = type.GetMethods(); ListattrList = new List (); foreach (MethodInfo me in infos) { attrList.Add("" + me.IsPublic); attrList.Add("继承自" + me.DeclaringType + "方法名" + me.Name + " 方法" + me.Attributes + " 修饰符" + me.ReturnParameter); } MemberInfo[] members = type.GetMembers(); foreach (MemberInfo m in members) { attrList.Add("继承自" + m.DeclaringType + "方法名" + m.Name + " 方法"); }