MethodBase.GetMethodFromHandle Metoda

Definice

Získá informace o metodě pomocí zadaného popisovače.

Přetížení

Name Description
GetMethodFromHandle(RuntimeMethodHandle)

Získá informace o metodě pomocí interní reprezentace metadat metody (popisovač).

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

MethodBase Získá objekt pro konstruktor nebo metodu reprezentovaný zadaný popisovač pro zadaný obecný typ.

GetMethodFromHandle(RuntimeMethodHandle)

Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs

Získá informace o metodě pomocí interní reprezentace metadat metody (popisovač).

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

Parametry

handle
RuntimeMethodHandle

Popisovač metody

Návraty

A MethodBase obsahující informace o metodě.

Výjimky

handle je neplatný.

Poznámky

Popisovače jsou platné pouze v doméně aplikace, ve které byly získány.

Platí pro

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs
Zdroj:
MethodBase.CoreCLR.cs

MethodBase Získá objekt pro konstruktor nebo metodu reprezentovaný zadaný popisovač pro zadaný obecný typ.

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

Parametry

handle
RuntimeMethodHandle

Popisovač reprezentace interních metadat konstruktoru nebo metody

declaringType
RuntimeTypeHandle

Popisovač obecného typu, který definuje konstruktor nebo metodu.

Návraty

Objekt MethodBase představující metodu nebo konstruktor určený parametrem handle, v obecném typu určeném parametrem declaringType.

Atributy

Výjimky

handle je neplatný.

Poznámky

Popisovače jsou platné pouze v doméně aplikace, ve které byly získány.

Struktura RuntimeMethodHandle konstruktoru nebo metody obecného typu může představovat různé MethodBase objekty v závislosti na typech zadaných pro parametry typu obecného typu. Pokud má například class G<T> (class G(Of T) v Visual Basic) metodu, která vrací typ T, objekt MethodBase pro tuto metodu v konstruované třídě, například G<int>, se liší od objektu MethodBase pro tuto metodu v definici obecného typu.

Platí pro