Returns the field specified by the given name.
[Visual Basic] Overrides Public Function GetField( _ ByVal name As String, _ ByVal bindingAttr As BindingFlags _ ) As FieldInfo [C#] public override FieldInfo GetField( string name, BindingFlags bindingAttr ); [C++] public: override FieldInfo* GetField( String* name, BindingFlags bindingAttr ); [JScript] public override function GetField( name : String, bindingAttr : BindingFlags ) : FieldInfo;
Returns the FieldInfo object representing the field declared or inherited by this type with the specified name and public or non-public modifier. If there are no matches then null is returned.
Exception Type | Condition |
---|---|
NotSupportedException | This method is not implemented. |
This method is not currently supported. As a workaround, retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.
NGWS Runtime Security:
ReflectionPermission | TypeInformation required for non-public members |
TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace