NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Type.GetFields (BindingFlags)

When implemented by a derived class, searches for the fields defined for the current Type, using the specified binding constraints.

[Visual Basic]
Overloads MustOverride Public Function GetFields( _
   ByVal bindingAttr As BindingFlags _
) As FieldInfo ()
[C#]
public abstract FieldInfo[] GetFields(
   BindingFlags bindingAttr
);
[C++]
public: virtual FieldInfo* GetFields(
   BindingFlags bindingAttr
) [] = 0;
[JScript]
public abstract function GetFields(
   bindingAttr : BindingFlags
) : FieldInfo[];

Parameters

bindingAttr
A bit mask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

zero, to conduct a case-sensitive search for public methods.

Return Value

An array of FieldInfo objects representing all fields defined for the current Type that match the specified binding constraints.

-or-

An empty array of type FieldInfo, if no fields are defined for the current Type, or if none of the defined fields match the binding constraints.

Exceptions

Exception Type Condition
SecurityException The BindingFlags value Public is used but the caller does not have ReflectionPermission to reflect non-public members outside the current assembly.

Remarks

Abstract. This method must be implemented by a derived class.

The following BindingFlags filter flags can be used to define which fields should be included in the search:

The following BindingFlags modifier flags can be used to change how the search works:

See BindingFlags for more information.

See Also

Type Class | Type Members | System Namespace | Type.GetFields Overload List