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
FieldInfo GetField(
   string name,
 BindingFlags bindingAttr
FieldInfo* GetField(
   String* name,
 BindingFlags bindingAttr
function GetField(
   name : String,
 bindingAttr : BindingFlags
) : FieldInfo;


The name of the field to find.
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.


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


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
© 2014 Microsoft. All rights reserved.