GetMethodToken Method

ModuleBuilder.GetMethodToken Method

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

[Visual Basic]
Public Function GetMethodToken( _
   ByVal method As MethodInfo _
) As MethodToken
public MethodToken GetMethodToken(
 MethodInfo method
public: MethodToken GetMethodToken(
 MethodInfo* method
public function GetMethodToken(
   method : MethodInfo
) : MethodToken;


A MethodToken object representing the method to get a token for.

Return Value

Returns the token used to identify the method represented by method within this module.


Exception Type Condition
ArgumentNullException method is a null reference (Nothing in Visual Basic).
InvalidOperationException The declaring type for the method is not in this module.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ModuleBuilder Class | ModuleBuilder Members | System.Reflection.Emit Namespace

© 2015 Microsoft