Mono Class Library: System.Reflection.Emit.ILGenerator Overview | Members

System.Reflection.Emit.ILGenerator.DefineLabel Method

Defines a new label, that can be used as a branch target. [Edit]

public virtual Label DefineLabel ()

Returns

The newly defined label. [Edit]

Remarks

This method only tells the System.Reflection.Emit.ILGenerator that the given label exists, and that it can be used as a branch target by branch instructions. It doesn't tell the System.Reflection.Emit.ILGenerator where the actual branch target is though, which is done using the ILGenerator.MarkLabel method, This two step approach allows you to jump to code that hasn't been emitted yet. [Edit]

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0