This documentation is archived and is not being maintained.

IReflect.GetFields Method

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

[Visual Basic]
Function GetFields( _
   ByVal bindingAttr As BindingFlags _
) As FieldInfo()
[C#]
FieldInfo[] GetFields(
   BindingFlags bindingAttr
);
[C++]
FieldInfo* GetFields(
   BindingFlags bindingAttr
) [];
[JScript]
function GetFields(
   bindingAttr : BindingFlags
) : FieldInfo[];

Parameters

bindingAttr
The binding attributes used to control the search.

Return Value

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IReflect Interface | IReflect Members | System.Reflection Namespace | BindingFlags | BindingFlags | BindingFlags

Show: