TypeInfo.DeclaredMembers 屬性

定義

取得目前類型所定義之成員的集合。Gets a collection of the members defined by the current type.

public:
 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.

適用於