MemberDescriptor.FindMethod Metoda

Definicja

Znajduje daną metodę poprzez odbicie.

Przeciążenia

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

Znajduje daną metodę przez odbicie, wyszukując tylko metody publiczne.

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

Znajduje daną metodę przez odbicie z opcją wyszukiwania tylko metod publicznych.

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

Źródło:
MemberDescriptor.cs
Źródło:
MemberDescriptor.cs
Źródło:
MemberDescriptor.cs

Znajduje daną metodę przez odbicie, wyszukując tylko metody publiczne.

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);
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

Parametry

componentClass
Type

Składnik, który zawiera metodę .

name
String

Nazwa metody do znalezienia.

args
Type[]

Tablica parametrów metody, używana do wyboru między metodami przeciążonym.

returnType
Type

Typ, który ma być zwracany dla metody .

Zwraca

Obiekt MethodInfo , który reprezentuje metodę lub null jeśli metoda nie zostanie znaleziona.

Dotyczy

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

Źródło:
MemberDescriptor.cs
Źródło:
MemberDescriptor.cs
Źródło:
MemberDescriptor.cs

Znajduje daną metodę przez odbicie z opcją wyszukiwania tylko metod publicznych.

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);
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

Parametry

componentClass
Type

Składnik, który zawiera metodę .

name
String

Nazwa metody do znalezienia.

args
Type[]

Tablica parametrów metody, używana do wyboru między metodami przeciążonym.

returnType
Type

Typ, który ma być zwracany dla metody .

publicOnly
Boolean

Czy ograniczyć wyszukiwanie do metod publicznych.

Zwraca

Obiekt MethodInfo , który reprezentuje metodę lub null jeśli metoda nie zostanie znaleziona.

Dotyczy