MemberDescriptor.FindMethod Metodo

Definizione

Trova il metodo specificato tramite reflection.

Overload

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

Trova il metodo specificato tramite reflection, cercando solo metodi pubblici.

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

Trova il metodo specificato tramite reflection, con un'opzione per cercare solo metodi pubblici.

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

Trova il metodo specificato tramite reflection, cercando solo metodi pubblici.

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

Parametri

componentClass
Type

Componente che contiene il metodo .

name
String

Nome del metodo da trovare.

args
Type[]

Matrice di parametri per il metodo , utilizzata per scegliere tra metodi di overload.

returnType
Type

Tipo da restituire per il metodo .

Valori restituiti

Oggetto MethodInfo che rappresenta il metodo o null se il metodo non viene trovato.

Si applica a

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

Trova il metodo specificato tramite reflection, con un'opzione per cercare solo metodi pubblici.

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

Parametri

componentClass
Type

Componente che contiene il metodo .

name
String

Nome del metodo da trovare.

args
Type[]

Matrice di parametri per il metodo , utilizzata per scegliere tra metodi di overload.

returnType
Type

Tipo da restituire per il metodo .

publicOnly
Boolean

Indica se limitare la ricerca ai metodi pubblici.

Valori restituiti

Oggetto MethodInfo che rappresenta il metodo o null se il metodo non viene trovato.

Si applica a