Mono Class Library: System.Reflection.Module Overview | Members

System.Reflection.Module.GetField Method

Returns a System.Reflection.FieldInfo instance that reflects the global public field that has the specified name, and is a member of the module reflected by the current instance.

public FieldInfo GetField (string name)

Parameters

name
A string that specifies the name of the field to be returned.

Returns

Returns a System.Reflection.FieldInfo instance that reflects the global public field that has the name name, and is a member of the module reflected by the current instance, if found; otherwise, returns null .

Exceptions

TypeReason
ArgumentNullExceptionname 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