MethodBase.GetMethodFromHandle Metoda

Definicja

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

Przeciążenia

Nazwa Opis
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)

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);
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

handle jest nieprawidłowy.

Uwagi

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

Dotyczy

GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)

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);
[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

Uchwyt do wewnętrznej reprezentacji metadanych konstruktora lub metody.

declaringType
RuntimeTypeHandle

Uchwyt typu ogólnego, który definiuje konstruktor lub metodę.

Zwraca

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

Atrybuty

Wyjątki

handle jest nieprawidłowy.

Uwagi

Dojścia 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 Visual Basic) ma metodę zwracającą typ T, obiekt MethodBase dla tej metody w skonstruowanej klasie, takiej jak G<int>, różni się od obiektu MethodBase dla tej metody w definicji typu ogólnego.

Dotyczy