GetMethodFromHandle Method (RuntimeMethodHandle, RuntimeTypeHandle)
Collapse the table of content
Expand the table of content

MethodBase.GetMethodFromHandle Method (RuntimeMethodHandle, RuntimeTypeHandle)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the constructor or method represented by the specified handle, for the specified generic type.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public static MethodBase GetMethodFromHandle(
	RuntimeMethodHandle handle,
	RuntimeTypeHandle declaringType


Type: System.RuntimeMethodHandle
A handle to the internal metadata representation of a constructor or method.
Type: System.RuntimeTypeHandle
A handle to the generic type that defines the constructor or method.

Return Value

Type: System.Reflection.MethodBase
The method or constructor specified by handle, in the generic type specified by declaringType.


This member is invoked late-bound through mechanisms such as Type.InvokeMember.


handle is invalid.

Handles are valid only in the application domain in which they were obtained.

A RuntimeMethodHandle structure for a constructor or method of a generic type can represent different MethodBase objects, depending on the types specified for the type parameters of the generic type. For example, if class G<T> (class G(Of T) in Visual Basic, generic <T> ref class G in C++) has a method that returns type T, the MethodBase object for that method in a constructed class such as G<int> (G(Of Integer) in Visual Basic) is different from the MethodBase object for that method in the generic type definition, the MethodBase object for G<string>, and so on.

Version Notes

Windows Phone

 For the declaringType parameter, this member uses RuntimeMethodHandle instead of RuntimeTypeHandle.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2017 Microsoft