TypeInfo.DeclaredFields 屬性

定義

取得目前類型所定義之欄位的集合。

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

屬性值

目前類型所定義之欄位的集合。

備註

若要篩選屬性的結果 DeclaredFields ,請使用 LINQ 查詢。 例如,針對源自運行時間的反映物件 (,例如,由於) 的結果 typeof(Object) ,您可以使用 類別中的 RuntimeReflectionExtensions 方法周遊繼承樹狀結構。 自定義反映內容的取用者無法使用這些方法,而且必須周游繼承樹狀結構本身。

適用於