Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IReflect.GetField Method

Returns the FieldInfo object corresponding to the specified field and BindingFlag.

[Visual Basic]
Function GetField( _
   ByVal name As String, _
   ByVal bindingAttr As BindingFlags _
) As FieldInfo
[C#]
FieldInfo GetField(
   string name,
 BindingFlags bindingAttr
);
[C++]
FieldInfo* GetField(
   String* name,
 BindingFlags bindingAttr
);
[JScript]
function GetField(
   name : String,
 bindingAttr : BindingFlags
) : FieldInfo;

Parameters

name
The name of the field to find.
bindingAttr
The binding attributes used to control the search.

Return Value

A FieldInfo object containing the field information for the named object that meets the search constraints specified in bindingAttr.

Exceptions

Exception Type Condition
AmbiguousMatchException The object implements multiple fields with the same name.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IReflect Interface | IReflect Members | System.Reflection Namespace | BindingFlags

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.