MemberDescriptor::FindMethod Method (Type^, String^, array<Type^>^, Type^, Boolean)

 

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

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

protected:
static MethodInfo^ FindMethod(
	Type^ componentClass,
	String^ name,
	array<Type^>^ args,
	Type^ returnType,
	bool publicOnly
)

Parameters

componentClass
Type: System::Type^

The component that contains the method.

name
Type: System::String^

The name of the method to find.

args
Type: array<System::Type^>^

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

returnType
Type: System::Type^

The type to return for the method.

publicOnly
Type: System::Boolean

Whether to restrict search to public methods.

Return Value

Type: System.Reflection::MethodInfo^

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

ReflectionPermission

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

.NET Framework
Available since 1.1
Return to top
Show: