OpCodes.Cgt 字段

定义

比较两个值。Compares two values. 如果第一个值大于第二个值,则将整数值 1 (int32) 推送到计算堆栈上;反之,将 0 (int32) 推送到计算堆栈上。If the first value is greater than the second, the integer value 1 (int32) is pushed onto the evaluation stack; otherwise 0 (int32) is pushed onto the evaluation stack.

public: static initonly System::Reflection::Emit::OpCode Cgt;
public static readonly System.Reflection.Emit.OpCode Cgt;
 staticval mutable Cgt : System.Reflection.Emit.OpCode
Public Shared ReadOnly Cgt 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
FE 02FE 02 cgtcgt 如果 value1 大于 value2,则推送 1;else 将0推送。Pushes 1 if value1 is greater than value2; else pushes 0.

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

  1. value1 推送到堆栈上。value1 is pushed onto the stack.

  2. value2 推送到堆栈上。value2 is pushed onto the stack.

  3. value2 和 @no__t 从堆栈中弹出;如果 value1 大于 value2,则 @no__t 测试。value2 and value1 are popped from the stack; cgt tests if value1 is greater than value2.

  4. 如果 value1 大于 value2,则将1推送到堆栈上;否则,将0推送到堆栈上。If value1 is greater than value2, 1 is pushed onto the stack; otherwise 0 is pushed onto the stack.

@No__t-0 指令比较 value1value2The cgt instruction compares value1 and value2. 如果 value1 严格大于 value2,则将 int32 值推送到堆栈上。If value1 is strictly greater than value2, then an int32 value of 1 is pushed on the stack. 否则,将 @no__t 0 值0推送到堆栈上。Otherwise, an int32 value of 0 is pushed on the stack.

  • 对于浮点数,如果数字未排序(即,如果其中一个或两个参数均为 NaN),cgt 返回0。For floating-point numbers, cgt returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN).

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

  • ILGenerator.Emit(OpCode)ILGenerator.Emit(OpCode)

适用于