NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TypeBuilder.GetField

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;

Parameters

name
The name of the field to get.
bindingAttr
This must be a bit flag from BindingFlags: InvokeMethod, NonPublic, etc.

Return Value

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.

Exceptions

Exception Type Condition
NotSupportedException This method is not implemented.

Remarks

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.

Requirements

NGWS Runtime Security:

ReflectionPermission TypeInformation required for non-public members

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace