OpCodes.Leave_S 字段

定义

退出受保护的代码区域,无条件将控制转移到目标指令(缩写形式)。Exits a protected region of code, unconditionally transferring control to a target instruction (short form).

public: static initonly System::Reflection::Emit::OpCode Leave_S;
public static readonly System.Reflection.Emit.OpCode Leave_S;
 staticval mutable Leave_S : System.Reflection.Emit.OpCode
Public Shared ReadOnly Leave_S As OpCode 

字段值

注解

下表列出了指令的十六进制和 Microsoft 中间语言(MSIL)程序集格式以及简短的参考摘要:The following table lists the instruction's hexadecimal and Microsoft Intermediate Language (MSIL) assembly format, along with a brief reference summary:

格式Format 程序集格式Assembly Format 说明Description
DE < int8 >DE < int8 > targetleave.s target 退出受保护的代码区域(缩写形式)。Exit a protected region of code, short form.

没有为此指令指定堆栈转换行为。There is no stack transition behavior specified for this instruction.

@No__t-0 指令无条件地将控制转移到传递的目标指令,表示为从当前指令后面的指令开头开始的1字节有符号偏移量。The leave.s instruction unconditionally transfers control to the passed target instruction, represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

@No__t-0 指令类似于 @no__t 1 指令,但它可用于退出 @no__t 2、filtercatch 块,而普通的分支指令只能用在此类块中以传输控制。The leave.s instruction is similar to the br instruction, but it can be used to exit a try, filter, or catch block whereas the ordinary branch instructions can only be used in such a block to transfer control within it. @No__t-0 指令将清空计算堆栈,并确保执行适当的周围 @no__t 块。The leave.s instruction empties the evaluation stack and ensures that the appropriate surrounding finally blocks are executed.

不能使用 @no__t 0 指令退出 @no__t 块。You cannot use a leave.s instruction to exit a finally block. 为了简化异常处理程序的代码生成,在 catch 块内有效地使用 leave.s 指令将控制转移到关联的 @no__t 1 块内的任何指令。To ease code generation for exception handlers it is valid from within a catch block to use a leave.s instruction to transfer control to any instruction within the associated try block.

如果指令具有一个或多个前缀代码,则只能将控制转移到其中的第一个前缀。If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes.

以下 @no__t 0 方法重载可以使用 @no__t 操作码:The following Emit method overload can use the leave.s opcode:

  • ILGenerator (操作码、标签)ILGenerator.Emit(OpCode, Label)

适用于