Click or drag to resize
IReflectGetField Method
Returns the FieldInfo object that corresponds to the specified field and binding flag.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
FieldInfo GetField(
	string name,
	BindingFlags bindingAttr
)

Parameters

name
Type: SystemString
The name of the field to find.
bindingAttr
Type: System.ReflectionBindingFlags
The binding attributes used to control the search.

Return Value

Type: FieldInfo
A FieldInfo object containing the field information for the named object that meets the search constraints specified in bindingAttr.
Exceptions
ExceptionCondition
AmbiguousMatchExceptionThe object implements multiple fields with the same name.
See Also