Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ILGenerator.Emit Method (OpCode, Type)

Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the metadata token for the given type.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)
public virtual void Emit(
	OpCode opcode,
	Type cls


Type: System.Reflection.Emit.OpCode
The MSIL instruction to be put onto the stream.
Type: System.Type
The type that is the target of opcode.

cls is null.

The instruction values are defined in the OpCodes enumeration.

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


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.