Export (0) Print
Expand All

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 Note:

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

Silverlight

Supported in: 5, 4

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

Community Additions

ADD
Show:
© 2014 Microsoft