Puts a OpCodes.Calli instruction onto the Microsoft intermediate language (MSIL) stream, specifying a managed calling convention for the indirect call.
- 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.
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.