Puts the specified instruction onto the IL stream followed by the metadata token for the given type.
[Visual Basic] Overloads Overridable Public Sub Emit( _ ByVal opcode As OpCode, _ ByVal cls As Type _ ) [C#] public virtual void Emit( OpCode opcode, Type cls ); [C++] public: virtual void Emit( OpCode opcode, Type* cls ); [JScript] public function Emit( opcode : OpCode, cls : Type );
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 PE.
ILGenerator Class | ILGenerator Members | System.Reflection.Emit Namespace | ILGenerator.Emit Overload List