System.Reflection.Emit.MethodBuilder.MakeGenericMethod Method

Returns a generic method constructed from the current generic method definition using the specified generic type arguments.

Syntax

public override System.Reflection.MethodInfo MakeGenericMethod (params Type[] typeArguments)

Parameters

typeArguments
An array of Type objects that represent the type arguments for the generic method.

Returns

A System.Reflection.MethodInfo representing the generic method constructed from the current generic method definition using the specified generic type arguments.

Remarks

When you are emitting dynamic code, you might need to emit a call to a method constructed from the generic method definition represented by a System.Reflection.Emit.MethodBuilder, before the enclosing type has been completed. You can use the MethodBuilder.MakeGenericMethod(Type[]) method to create a System.Reflection.MethodInfo for such a constructed method, and use the System.Reflection.MethodInfo in the emitted call.

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0