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


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


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.