Partager via


Type.GetField Method (String)

Searches for the data field with the specified name.

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

Syntax

public FieldInfo GetField (
         string name
)

Parameters

  • name
    The String object that contains the name of the field you want to get.

Return Value

A FieldInfo object that represents the field with the specified name, if it is found; otherwise, a null reference.

Remarks

The search name you use in a GetField search is case-sensitive.

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