AccessibleObject.IReflect.GetFields(BindingFlags) 方法

定義

取得對應到目前類別的所有欄位之 FieldInfo 物件陣列。Gets an array of FieldInfo objects corresponding to all fields of the current class. 如需這個成員的說明,請參閱 GetFields(BindingFlags)For a description of this member, see GetFields(BindingFlags).

 virtual cli::array <System::Reflection::FieldInfo ^> ^ System.Reflection.IReflect.GetFields(System::Reflection::BindingFlags bindingAttr) = System::Reflection::IReflect::GetFields;
System.Reflection.FieldInfo[] IReflect.GetFields (System.Reflection.BindingFlags bindingAttr);
Function GetFields (bindingAttr As BindingFlags) As FieldInfo() Implements IReflect.GetFields

參數

bindingAttr
BindingFlags

繫結屬性,用來控制搜尋。The binding attributes used to control the search.

傳回

FieldInfo 物件陣列,包含符合 bindingAttr 中所指定搜尋條件約束的這個反映物件所有欄位資訊。An array of FieldInfo objects containing all the field information for this reflection object that meets the search constraints specified in bindingAttr.

實作

備註

每個欄位都必須有唯一的名稱。Each field must have a unique name. @No__t-0 旗標會指定在搜尋中包含非公用欄位。The BindingFlags.NonPublic flag specifies that nonpublic fields are included in the search. @No__t-0 旗標會指定在搜尋中包含公用欄位。The BindingFlags.Public flag specifies that public fields are included in the search.

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 AccessibleObject 執行個體轉換成 IReflect 介面時,才能使用這個成員。It can be used only when the AccessibleObject instance is cast to an IReflect interface.

適用於