ModuleBuilder.GetMethodImpl Method (String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])


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.

Exception Condition

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.


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

.NET Framework
Available since 4.0
Available since 4.0
Return to top