NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ILGenerator.Emit (OpCode, MethodInfo)

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
);

Parameters

opcode
The IL instruction to be emitted onto the stream.
meth
A MethodInfo representing a method.

Exceptions

Exception Type Condition
ArgumentNullException if meth is a null reference (in Visual Basic Nothing)

Remarks

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.

See Also

ILGenerator Class | ILGenerator Members | System.Reflection.Emit Namespace | ILGenerator.Emit Overload List