Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ILGenerator::EmitCalli Method (OpCode, CallingConventions, Type^, array<Type^>^, array<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,
	array<Type^>^ parameterTypes,
	array<Type^>^ optionalParameterTypes
)

Parameters

opcode
Type: System.Reflection.Emit::OpCode

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

callingConvention
Type: System.Reflection::CallingConventions

The managed calling convention to be used.

returnType
Type: System::Type^

The Type of the result.

parameterTypes
Type: array<System::Type^>^

The types of the required arguments to the instruction.

optionalParameterTypes
Type: array<System::Type^>^

The types of the optional arguments for varargs calls.

Exception Condition
InvalidOperationException

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
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Return to top
Show:
© 2017 Microsoft