System.Reflection.Emit.ILGenerator.EmitCalli Method

Puts a OpCodes.Calli instruction onto the Microsoft intermediate language (MSIL) stream, specifying a managed calling convention for the indirect call.

Syntax

public virtual void EmitCalli (OpCode opcode, System.Reflection.CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type[] optionalParameterTypes)

Parameters

opcode
The MSIL instruction to be emitted onto the stream. Must be OpCodes.Calli.
callingConvention
The managed calling convention to be used.
returnType
The Type of the result.
parameterTypes
The types of the required arguments to the instruction.
optionalParameterTypes
The types of the optional arguments for varargs calls.

Remarks

Use ILGenerator.EmitCalli(OpCode, System.Reflection.CallingConventions, Type, Type[], Type[]) to put a OpCodes.Calli instruction onto the stream. Do not use ILGenerator.Emit(OpCode).

If optionalParameterTypes specifies optional arguments, callingConvention must include the System.Reflection.CallingConventions.VarArgs flag.

Requirements

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