MemberDescriptor.FindMethod MemberDescriptor.FindMethod MemberDescriptor.FindMethod MemberDescriptor.FindMethod Method

Definition

Finds the given method through reflection.

Overloads

FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type)

Finds the given method through reflection, searching only for public methods.

FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean)

Finds the given method through reflection, with an option to search only public methods.

FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type)

Finds the given method through reflection, searching only for public methods.

protected:
 static System::Reflection::MethodInfo ^ FindMethod(Type ^ componentClass, System::String ^ name, cli::array <Type ^> ^ args, Type ^ returnType);
protected static System.Reflection.MethodInfo FindMethod (Type componentClass, string name, Type[] args, Type returnType);
static member FindMethod : Type * string * Type[] * Type -> System.Reflection.MethodInfo
Protected Shared Function FindMethod (componentClass As Type, name As String, args As Type(), returnType As Type) As MethodInfo

Parameters

componentClass
Type Type Type Type

The component that contains the method.

name
String String String String

The name of the method to find.

args
Type[]

An array of parameters for the method, used to choose between overloaded methods.

returnType
Type Type Type Type

The type to return for the method.

Returns

A MethodInfo that represents the method, or null if the method is not found.

Security

ReflectionPermission
for access to private class members and metadata. Associated enumeration: Unrestricted

FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean)

Finds the given method through reflection, with an option to search only public methods.

protected:
 static System::Reflection::MethodInfo ^ FindMethod(Type ^ componentClass, System::String ^ name, cli::array <Type ^> ^ args, Type ^ returnType, bool publicOnly);
protected static System.Reflection.MethodInfo FindMethod (Type componentClass, string name, Type[] args, Type returnType, bool publicOnly);
static member FindMethod : Type * string * Type[] * Type * bool -> System.Reflection.MethodInfo
Protected Shared Function FindMethod (componentClass As Type, name As String, args As Type(), returnType As Type, publicOnly As Boolean) As MethodInfo

Parameters

componentClass
Type Type Type Type

The component that contains the method.

name
String String String String

The name of the method to find.

args
Type[]

An array of parameters for the method, used to choose between overloaded methods.

returnType
Type Type Type Type

The type to return for the method.

publicOnly
Boolean Boolean Boolean Boolean

Whether to restrict search to public methods.

Returns

A MethodInfo that represents the method, or null if the method is not found.

Security

ReflectionPermission
for access to private class members and metadata. Associated enumeration: Unrestricted

Applies to