Partager via


Type.GetFields Method (BindingFlags)

When overridden in a derived class, this method searches for the fields defined for the current type, using the specified binding constraints (flags).

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public virtual abstract FieldInfo [] GetFields (
         BindingFlags bindingAttr
)

Parameters

  • bindingAttr
    A bitmask containing one or more BindingFlags objects that specify how the search is conducted.

    -or-

    0 (zero), to return a null reference.

Return Value

An array of FieldInfo objects representing all of the fields defined for the current type.

-or-

An empty FieldInfo array, if no fields are defined for the current type.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

Type Class
Type Members
System Namespace