TypeInfo.DeclaredMembers 属性


获取由当前类型定义的成员的集合。Gets a collection of the members defined by the current type.

 virtual property System::Collections::Generic::IEnumerable<System::Reflection::MemberInfo ^> ^ DeclaredMembers { System::Collections::Generic::IEnumerable<System::Reflection::MemberInfo ^> ^ get(); };
public virtual System.Collections.Generic.IEnumerable<System.Reflection.MemberInfo> DeclaredMembers { get; }
member this.DeclaredMembers : seq<System.Reflection.MemberInfo>
Public Overridable ReadOnly Property DeclaredMembers As IEnumerable(Of MemberInfo)


由当前类型定义的成员的集合。A collection of the members defined by the current type.


若要筛选DeclaredMembers属性的结果,请使用 LINQ 查询。To filter the results of the DeclaredMembers property, use LINQ queries. 对于源于运行时的反射对象(例如,作为的结果typeof(Object)),您可以使用RuntimeReflectionExtensions类中的方法遍历继承树。For reflection objects that originate with the runtime (for example, as the result of typeof(Object)), you can traverse the inheritance tree by using the methods in the RuntimeReflectionExtensions class. 自定义反射上下文中的对象的使用者不能使用这些方法,并且必须遍历继承树本身。Consumers of objects from customized reflection contexts cannot use these methods and must traverse the inheritance tree themselves.