Share via


ModuleBuilder.GetMethodToken Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns the token used to identify the specified method within this module.

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Function GetMethodToken ( _
    method As MethodInfo _
) As MethodToken
[SecuritySafeCriticalAttribute]
public MethodToken GetMethodToken(
    MethodInfo method
)

Parameters

Return Value

Type: System.Reflection.Emit.MethodToken
The token used to identify the specified method within this module.

Exceptions

Exception Condition
ArgumentNullException

method is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

The declaring type for the method is not in this module.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.