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!

Type.GetMethod (String, BindingFlags)

Searches for the specified method, using the specified binding constraints.

[Visual Basic]
Overloads Overridable Public Function GetMethod( _
   ByVal name As String, _
   ByVal bindingAttr As BindingFlags _
) As MethodInfo
[C#]
public virtual MethodInfo GetMethod(
   string name,
   BindingFlags bindingAttr
);
[C++]
public: virtual MethodInfo* GetMethod(
   String* name,
   BindingFlags bindingAttr
);
[JScript]
public function GetMethod(
   name : String,
   bindingAttr : BindingFlags
) : MethodInfo;

Parameters

name
The String containing the name of the method to get.
bindingAttr
A bit mask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

zero, to conduct a case-sensitive search for public methods.

Return Value

A MethodInfo object representing the method that matches the specified requirements, if found; otherwise, a null reference (in Visual Basic Nothing).

Exceptions

Exception Type Condition
AmbiguousMatchException More than one method is found with the specified name and matching the specified binding constraints.
ArgumentNullException name is a null reference (Nothing).
SecurityException The requested method is non-public and the caller does not have ReflectionPermission to reflect non-public members outside the current assembly.

Remarks

The following BindingFlags filter flags can be used to define which methods should be included in the search:

The following BindingFlags modifier flags can be used to change how the search works:

See BindingFlags for more information.

See Also

Type Class | Type Members | System Namespace | Type.GetMethod Overload List