This documentation is archived and is not being maintained.

ModuleBuilder.GetMethodImpl Method

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

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

protected override MethodInfo GetMethodImpl(
	string name,
	BindingFlags bindingAttr,
	Binder binder,
	CallingConventions callConvention,
	Type[] types,
	ParameterModifier[] modifiers
)

Parameters

name
Type: System.String
The method name.
bindingAttr
Type: System.Reflection.BindingFlags
A combination of BindingFlags bit flags used to control the search.
binder
Type: System.Reflection.Binder
An object that implements Binder, containing properties related to this method.
callConvention
Type: System.Reflection.CallingConventions
The calling convention for the method.
types
Type: System.Type[]
The parameter types of the method.
modifiers
Type: 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 null if such a method does not exist.

ExceptionCondition
ArgumentNullException

name is null, types is null, or an element of types is null.

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

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

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: