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, Label)

Puts the specified instruction onto the stream and leaves space to include a Label when fixes are done.

[Visual Basic]
Overloads Overridable Public Sub Emit( _
   ByVal opcode As OpCode, _
   ByVal label As Label _
)
[C#]
public virtual void Emit(
   OpCode opcode,
   Label label
);
[C++]
public: virtual void Emit(
   OpCode opcode,
   Label label
);
[JScript]
public function Emit(
   opcode : OpCode,
   label : Label
);

Parameters

opcode
The IL instruction to be emitted onto the stream.
label
The Label to which to branch from this location.

Remarks

The instruction values are defined in the OpCodes enumeration.

Labels are created using DefineLabel and their location within the stream is fixed by using MarkLabel. If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. instruction must represent a branch instruction. Since branches are relative instructions, label will be replaced with the correct offset to branch during the fixup process.

See Also

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