MethodBase.GetMethodFromHandle Metodo

Definizione

Ottiene informazioni sul metodo utilizzando l'handle specificato.

Overload

GetMethodFromHandle(RuntimeMethodHandle)

Ottiene le informazioni sul metodo utilizzando la rappresentazione interna dei metadati (handle) del metodo.

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

Ottiene un oggetto MethodBase per il costruttore o il metodo rappresentati dall'handle specificato, per il tipo generico specificato.

GetMethodFromHandle(RuntimeMethodHandle)

Source:
MethodBase.CoreCLR.cs
Source:
MethodBase.CoreCLR.cs
Source:
MethodBase.CoreCLR.cs

Ottiene le informazioni sul metodo utilizzando la rappresentazione interna dei metadati (handle) del metodo.

public:
 static System::Reflection::MethodBase ^ GetMethodFromHandle(RuntimeMethodHandle handle);
public static System.Reflection.MethodBase GetMethodFromHandle (RuntimeMethodHandle handle);
public static System.Reflection.MethodBase? GetMethodFromHandle (RuntimeMethodHandle handle);
static member GetMethodFromHandle : RuntimeMethodHandle -> System.Reflection.MethodBase
Public Shared Function GetMethodFromHandle (handle As RuntimeMethodHandle) As MethodBase

Parametri

handle
RuntimeMethodHandle

Handle del metodo.

Restituisce

MethodBase contenente informazioni sul metodo.

Eccezioni

handle non è valido.

Commenti

Gli handle sono validi solo nel dominio dell'applicazione in cui sono stati ottenuti.

Si applica a

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

Source:
MethodBase.CoreCLR.cs
Source:
MethodBase.CoreCLR.cs
Source:
MethodBase.CoreCLR.cs

Ottiene un oggetto MethodBase per il costruttore o il metodo rappresentati dall'handle specificato, per il tipo generico specificato.

public:
 static System::Reflection::MethodBase ^ GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType);
public static System.Reflection.MethodBase GetMethodFromHandle (RuntimeMethodHandle handle, RuntimeTypeHandle declaringType);
public static System.Reflection.MethodBase? GetMethodFromHandle (RuntimeMethodHandle handle, RuntimeTypeHandle declaringType);
[System.Runtime.InteropServices.ComVisible(false)]
public static System.Reflection.MethodBase GetMethodFromHandle (RuntimeMethodHandle handle, RuntimeTypeHandle declaringType);
static member GetMethodFromHandle : RuntimeMethodHandle * RuntimeTypeHandle -> System.Reflection.MethodBase
[<System.Runtime.InteropServices.ComVisible(false)>]
static member GetMethodFromHandle : RuntimeMethodHandle * RuntimeTypeHandle -> System.Reflection.MethodBase
Public Shared Function GetMethodFromHandle (handle As RuntimeMethodHandle, declaringType As RuntimeTypeHandle) As MethodBase

Parametri

handle
RuntimeMethodHandle

Handle per la rappresentazione dei metadati interni di un costruttore o di un metodo.

declaringType
RuntimeTypeHandle

Handle al tipo generico che definisce il costruttore o il metodo.

Restituisce

Oggetto MethodBase che rappresenta il metodo o il costruttore specificati da handle, nel tipo generico specificato da declaringType.

Attributi

Eccezioni

handle non è valido.

Commenti

Gli handle sono validi solo nel dominio dell'applicazione in cui sono stati ottenuti.

Una RuntimeMethodHandle struttura per un costruttore o un metodo di un tipo generico può rappresentare oggetti diversi MethodBase , a seconda dei tipi specificati per i parametri di tipo del tipo del tipo generico. Ad esempio, se class G<T> (class G(Of T) in Visual Basic, generic <T> ref class G in C++) ha un metodo che restituisce il tipo , l'oggetto MethodBase per tale metodo in una classe costruita, ad G<int> esempio è diverso dall'oggetto MethodBase per tale metodo nella definizione del tipo Tgenerico.

Si applica a