The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ModuleBuilder::GetMethodToken Method (MethodInfo^, IEnumerable<Type^>^)
.NET Framework (current version)
Returns the token used to identify the method that has the specified attributes and parameter types within this module.
Assembly: mscorlib (in mscorlib.dll)
public:
MethodToken GetMethodToken(
MethodInfo^ method,
IEnumerable<Type^>^ optionalParameterTypes
)
Parameters
- method
-
Type:
System.Reflection::MethodInfo^
The method to get a token for.
- optionalParameterTypes
-
Type:
System.Collections.Generic::IEnumerable<Type^>^
A collection of the types of the optional parameters to the method.
Return Value
Type: System.Reflection.Emit::MethodTokenThe token used to identify the specified method within this module.
| Exception | Condition |
|---|---|
| ArgumentNullException | method is null. |
| InvalidOperationException | The declaring type for the method is not in this module. |
.NET Framework
Available since 4.5
Available since 4.5
Show: