ModuleBuilder.GetMethodImpl Method

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

Returns the module-level method that matches the specified criteria.

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

Syntax

'Declaration
Protected Overrides Function GetMethodImpl ( _
    name As String, _
    bindingAttr As BindingFlags, _
    binder As Binder, _
    callConvention As CallingConventions, _
    types As Type(), _
    modifiers As ParameterModifier() _
) As MethodInfo
protected override MethodInfo GetMethodImpl(
    string name,
    BindingFlags bindingAttr,
    Binder binder,
    CallingConventions callConvention,
    Type[] types,
    ParameterModifier[] modifiers
)

Parameters

  • types
    Type: array<System.Type[]
    The parameter types of the method.
  • modifiers
    Type: array<System.Reflection.ParameterModifier[]
    An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.

Return Value

Type: System.Reflection.MethodInfo
A method that is defined at the module level, and matches the specified criteria; or nulla null reference (Nothing in Visual Basic) if such a method does not exist.

Exceptions

Exception Condition
ArgumentNullException

name is nulla null reference (Nothing in Visual Basic), types is nulla null reference (Nothing in Visual Basic), or an element of types is nulla null reference (Nothing in Visual Basic).

Remarks

This method provides the implementation for all overloads of the inherited Module.GetMethod method. Use the inherited Module.GetMethod method to get methods that have been declared at the module level. Module-level methods are defined in emitted code by using the DefineGlobalMethod method.

Important noteImportant Note:

Module-level methods cannot be retrieved until after the CreateGlobalFunctions method has been called for the module.

Version Information

Silverlight

Supported in: 5, 4

Platforms

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