System.Reflection.Module.ResolveMethod Method

Returns the method or constructor identified by the specified metadata token, in the context defined by the specified generic type parameters.

Syntax

public virtual MethodBase ResolveMethod (int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)

Parameters

metadataToken
A metadata token that identifies a method or constructor in the module.
genericTypeArguments
An array of Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.
genericMethodArguments
An array of Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.

Returns

A System.Reflection.MethodBase object representing the method that is identified by the specified metadata token.

Remarks

Use the Type.GetGenericArguments method on the type where metadataToken is in scope to obtain an array of generic type arguments for genericTypeArguments. Use the MethodInfo.GetGenericArguments method on the method where metadataToken is in scope to obtain an array of generic type arguments for genericMethodArguments. It is always safe to provide these arguments, even when they are not needed.

Note:

Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". The documentation is available online; see tp://go.microsoft.com/fwlink/?LinkID=99212 on MSDN and tp://go.microsoft.com/fwlink/?LinkID=65552 on the ECMA Web site.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0