Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Module::GetField Method (String^, BindingFlags)

 

Returns a field having the specified name and binding attributes.

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

public:
virtual FieldInfo^ GetField(
	String^ name,
	BindingFlags bindingAttr
)

Parameters

name
Type: System::String^

The field name.

bindingAttr
Type: System.Reflection::BindingFlags

One of the BindingFlags bit flags used to control the search.

Return Value

Type: System.Reflection::FieldInfo^

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

Exception Condition
ArgumentNullException

The name parameter is null.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft