Freigeben über


ILGenerator.Emit Method (OpCode, ConstructorInfo)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Puts the specified instruction and metadata token for the specified constructor onto the Microsoft intermediate language (MSIL) stream of instructions.

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

Syntax

'Declaration
<ComVisibleAttribute(True)> _
<SecuritySafeCriticalAttribute> _
Public Overridable Sub Emit ( _
    opcode As OpCode, _
    con As ConstructorInfo _
)
[ComVisibleAttribute(true)]
[SecuritySafeCriticalAttribute]
public virtual void Emit(
    OpCode opcode,
    ConstructorInfo con
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

con is nulla null reference (Nothing in Visual Basic).

Remarks

The instruction values are defined in the OpCodes enumeration.

The location of con is recorded so that the instruction stream can be patched if necessary when persisting the module to a portable executable (PE) file.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.