Export (0) Print
Expand All

ILGenerator.EmitCalli Method (OpCode, CallingConventions, Type, Type[], Type[])

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

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

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


Type: System.Reflection.Emit.OpCode

The MSIL instruction to be emitted onto the stream. Must be OpCodes.Calli.

Type: System.Reflection.CallingConventions

The managed calling convention to be used.

Type: System.Type

The Type of the result.

Type: System.Type[]

The types of the required arguments to the instruction.

Type: System.Type[]

The types of the optional arguments for varargs calls.


optionalParameterTypes is not null, but callingConvention does not include the CallingConventions.VarArgs flag.

Use EmitCalli to put a Calli instruction onto the stream. Do not use Emit.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft