OpCodes.Brfalse_S 字段


如果 valuefalse、空引用或零,则将控制转移到目标指令。Transfers control to a target instruction if value is false, a null reference, or zero.

public: static initonly System::Reflection::Emit::OpCode Brfalse_S;
public static readonly System.Reflection.Emit.OpCode Brfalse_S;
 staticval mutable Brfalse_S : System.Reflection.Emit.OpCode
Public Shared ReadOnly Brfalse_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
2C <int8 >2C <int8 > brfalse targetbrfalse.s target

brnull targetbrnull.s target

brzero targetbrzero.s target
如果 false (短格式),则按指定的偏移量分支到目标指令。Branches to a target instruction at the specified offset if false, short form.

堆栈转换行为顺序如下:The stack transitional behavior, in sequential order, is:

  1. 前一操作将 value 推送到堆栈上。value is pushed onto the stack by a previous operation.

  2. 从堆栈中弹出 value;如果 value @no__t 为-2,则分支到 @no__t。value is popped from the stack; if value is false, branch to target.

如果 value (类型 @no__t,`int64`,对象引用 O,托管指针 &,暂时性指针 *native int)为零,则 brfalse.s 指令(及其别名 @no__t 为-1,brzero)会将控制转移到指定的目标指令。(brnull0)。The brfalse.s instruction (and its aliases brnull and brzero) transfers control to the specified target instruction if value (of type int32, int64, object reference O, managed pointer &, transient pointer *, native int) is zero (false). 如果 @no__t 为非零(true),则在下一条指令处继续执行。If value is non-zero (true) execution continues at the next instruction.

目标指令表示为与当前指令后面的指令开头之间的1字节有符号偏移量。The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction.

如果目标指令具有一个或多个前缀代码,则只能将控制转移到其中的第一个前缀。If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. 控制传入和传出 trycatchfilterfinally 块无法通过此说明执行。Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction.

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

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