Puts the specified instruction onto the IL stream followed by the metadata token for the given method.
[Visual Basic] Overloads Overridable Public Sub Emit( _ ByVal opcode As OpCode, _ ByVal meth As MethodInfo _ ) [C#] public virtual void Emit( OpCode opcode, MethodInfo meth ); [C++] public: virtual void Emit( OpCode opcode, MethodInfo* meth ); [JScript] public function Emit( opcode : OpCode, meth : MethodInfo );
Exception Type | Condition |
---|---|
ArgumentNullException | if meth is a null reference (in Visual Basic Nothing) |
The instruction values are defined in the OpCodes enumeration.
The location of meth is recorded so that the instruction stream can be patched if necessary when persisting the module to a PE.
ILGenerator Class | ILGenerator Members | System.Reflection.Emit Namespace | ILGenerator.Emit Overload List