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!

TypeDelegator.GetField

Returns the FieldInfo object representing the field with the specified 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 find.
bindingAttr
This bit mask affects the way in which the search is conducted. The binding attributes used to control the search. An example is Binder.NonPublic

Return Value

Returns an FieldInfo object representing the field declared or inherited by this TypeDelegator with the specified name. Returns null if no such field is found.

Remarks

Use a bindingAttr of BindingFlags.NonPublic to return all public and nonpublic fields. Use BindingFlags.IgnoreCase to ignore the case of the fields as the search is case sensitive.

See Also

TypeDelegator Class | TypeDelegator Members | System.Reflection Namespace