System.Reflection.Module.GetField Method

Returns a field having the specified name.

Syntax

public FieldInfo GetField (string name)

Parameters

name
The field name.

Returns

A FieldInfo object having the specified name, or null if the field does not exist.

Exceptions

TypeReason
ArgumentNullException name is null.

Remarks

Note: A global public field is a static field with a module-level scope.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0