MethodBase.GetMethodFromHandle Metoda

Definicja

Pobiera informacje o metodzie przy użyciu określonego uchwytu.

Przeciążenia

GetMethodFromHandle(RuntimeMethodHandle)

Pobiera informacje o metodzie przy użyciu wewnętrznej reprezentacji metadanych metody (uchwyt).

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

MethodBase Pobiera obiekt dla konstruktora lub metody reprezentowanej przez określony uchwyt dla określonego typu ogólnego.

GetMethodFromHandle(RuntimeMethodHandle)

Źródło:
MethodBase.CoreCLR.cs
Źródło:
MethodBase.CoreCLR.cs
Źródło:
MethodBase.CoreCLR.cs

Pobiera informacje o metodzie przy użyciu wewnętrznej reprezentacji metadanych metody (uchwyt).

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

Uchwyt metody.

Zwraca

Zawiera MethodBase informacje o metodzie.

Wyjątki

Nazwa handle jest niepoprawna.

Uwagi

Uchwyty są prawidłowe tylko w domenie aplikacji, w której zostały uzyskane.

Dotyczy

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

Źródło:
MethodBase.CoreCLR.cs
Źródło:
MethodBase.CoreCLR.cs
Źródło:
MethodBase.CoreCLR.cs

MethodBase Pobiera obiekt dla konstruktora lub metody reprezentowanej przez określony uchwyt dla określonego typu ogólnego.

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

Dojście do wewnętrznej reprezentacji metadanych konstruktora lub metody.

declaringType
RuntimeTypeHandle

Dojście do typu ogólnego, który definiuje konstruktor lub metodę.

Zwraca

MethodBase Obiekt reprezentujący metodę lub konstruktor określony przez handlemetodę w typie ogólnym określonym przez declaringType.

Atrybuty

Wyjątki

Nazwa handle jest niepoprawna.

Uwagi

Uchwyty są prawidłowe tylko w domenie aplikacji, w której zostały uzyskane.

Struktura RuntimeMethodHandle konstruktora lub metody typu ogólnego może reprezentować różne MethodBase obiekty w zależności od typów określonych dla parametrów typu ogólnego. Jeśli na przykład class G<T> (class G(Of T) w języku Visual Basic generic <T> ref class G w języku C++) ma metodę zwracającą typ T, MethodBase obiekt dla tej metody w skonstruowanej klasie, taki jak G<int> różni się od MethodBase obiektu dla tej metody w definicji typu ogólnego.

Dotyczy