MethodBase.GetMethodFromHandle Méthode

Définition

Obtient des informations sur la méthode à l'aide du handle spécifié.

Surcharges

GetMethodFromHandle(RuntimeMethodHandle)

Obtient des informations sur une méthode en utilisant la représentation interne des métadonnées (handle) de la méthode.

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

Obtient un objet MethodBase pour le constructeur ou la méthode représentés par le handle spécifié, pour le type générique donné.

GetMethodFromHandle(RuntimeMethodHandle)

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

Obtient des informations sur une méthode en utilisant la représentation interne des métadonnées (handle) de la méthode.

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

Paramètres

handle
RuntimeMethodHandle

Handle de la méthode.

Retours

MethodBase contenant les informations sur la méthode.

Exceptions

handle n'est pas valide.

Remarques

Les descripteurs sont valides uniquement dans le domaine d’application dans lequel ils ont été obtenus.

S’applique à

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

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

Obtient un objet MethodBase pour le constructeur ou la méthode représentés par le handle spécifié, pour le type générique donné.

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

Paramètres

handle
RuntimeMethodHandle

Handle vers la représentation interne des métadonnées d'un constructeur ou d'une méthode.

declaringType
RuntimeTypeHandle

Handle vers le type générique qui définit le constructeur ou la méthode.

Retours

Objet MethodBase représentant la méthode ou le constructeur spécifiés par handle dans le type générique spécifié par declaringType.

Attributs

Exceptions

handle n'est pas valide.

Remarques

Les descripteurs sont valides uniquement dans le domaine d’application dans lequel ils ont été obtenus.

Une RuntimeMethodHandle structure pour un constructeur ou une méthode d’un type générique peut représenter différents MethodBase objets, en fonction des types spécifiés pour les paramètres de type du type générique. Par exemple, si class G<T> (class G(Of T) en Visual Basic, generic <T> ref class G en C++) a une méthode qui retourne le type T, l’objet MethodBase de cette méthode dans une classe construite telle que G<int> est différent de l’objet MethodBase de cette méthode dans la définition de type générique.

S’applique à