Click or drag to resize
TypeGetField Method (String, BindingFlags)
Searches for the specified field, using the specified binding constraints.

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

Parameters

name
Type: SystemString
The string containing the name of the data field to get.
bindingAttr
Type: System.ReflectionBindingFlags
A bitmask comprised of one or more BindingFlags that specify how the search is conducted.-or- Zero, to return null.

Return Value

Type: FieldInfo
An object representing the field that matches the specified requirements, if found; otherwise, null.

Implements

IReflectGetField(String, BindingFlags)
Exceptions
ExceptionCondition
ArgumentNullExceptionname is null.
See Also