IReflect.GetFields(BindingFlags) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om