MethodInfo[] infos = type.GetMethods(); List<string> attrList = new List<string>(); 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 + " 方法"); }
时间: 2024-10-10 23:00:48