OpCodes.Mul 字段

定义

将两个值相乘并将结果推送到计算堆栈上。Multiplies two values and pushes the result on the evaluation stack.

public: static initonly System::Reflection::Emit::OpCode Mul;
public static readonly System.Reflection.Emit.OpCode Mul;
 staticval mutable Mul : System.Reflection.Emit.OpCode
Public Shared ReadOnly Mul 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
5A5A mulmul 将两个值相乘。Multiplies two values on the stack.

堆栈转换行为顺序如下: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 从堆栈中弹出;value1value2 相乘。value2 and value1 are popped from the stack; value1 is multiplied by value2.

  4. 将结果推送到堆栈上。The result is pushed onto the stack.

@No__t-0 指令将 value1 乘以 @no__t 2,并将结果推送到堆栈上。The mul instruction multiplies value1 by value2 and pushes the result on the stack. 整数运算在溢出时无提示截断高位。Integer operations silently truncate the upper bits on overflow.

对于使用溢出处理的特定于整数的乘法运算,请参阅 Mul_OvfSee Mul_Ovf for an integer-specific multiply operation with overflow handling.

对于浮点类型,为 0 * 无穷 = NaN。For floating-point types, 0 * infinity = NaN.

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

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

适用于