Muokkaa

Jaa


IReflect.GetFields(BindingFlags) Method

Definition

Returns an array of FieldInfo objects that correspond to all fields of the current class.

public:
 cli::array <System::Reflection::FieldInfo ^> ^ GetFields(System::Reflection::BindingFlags bindingAttr);
public System.Reflection.FieldInfo[] GetFields (System.Reflection.BindingFlags bindingAttr);
abstract member GetFields : System.Reflection.BindingFlags -> System.Reflection.FieldInfo[]
Public Function GetFields (bindingAttr As BindingFlags) As FieldInfo()

Parameters

bindingAttr
BindingFlags

The binding attributes used to control the search.

Returns

An array of FieldInfo objects containing all the field information for this reflection object that meets the search constraints specified in bindingAttr.

Remarks

The match is based upon a name. Each field must have a unique name. The BindingFlags.NonPublic flag specifies that non-public methods are included in the search. The BindingFlags.Public flag specifies that public methods are included in the search.

Applies to

See also