Share via


ModuleBuilder.GetArrayMethodToken Method

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

Returns the token for the named method on an array class.

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Function GetArrayMethodToken ( _
    arrayClass As Type, _
    methodName As String, _
    callingConvention As CallingConventions, _
    returnType As Type, _
    parameterTypes As Type() _
) As MethodToken
[SecuritySafeCriticalAttribute]
public MethodToken GetArrayMethodToken(
    Type arrayClass,
    string methodName,
    CallingConventions callingConvention,
    Type returnType,
    Type[] parameterTypes
)

Parameters

  • arrayClass
    Type: System.Type
    The type of the array itself, as opposed to the type of elements the array contains.
  • returnType
    Type: System.Type
    The return type of the method.
  • parameterTypes
    Type: array<System.Type[]
    The types of the parameters of the method.

Return Value

Type: System.Reflection.Emit.MethodToken
The token for the named method on an array class.

Exceptions

Exception Condition
ArgumentException

arrayClass is not an array type.

-or-

The length of methodName is zero.

ArgumentNullException

arrayClass or methodName is nulla null reference (Nothing in Visual Basic).

Remarks

This method is similar to GetArrayMethod, except that it returns the token of the array method instead of the method itself.

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.