OpCodes.Xor 字段

定义

计算位于计算堆栈顶部的两个值的按位异或,并且将结果推送到计算堆栈上。Computes the bitwise XOR of the top two values on the evaluation stack, pushing the result onto the evaluation stack.

public: static initonly System::Reflection::Emit::OpCode Xor;
public static readonly System.Reflection.Emit.OpCode Xor;
 staticval mutable Xor : System.Reflection.Emit.OpCode
Public Shared ReadOnly Xor 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
6161 xorxor 计算两个整数值的按位 XOR 并返回整数。Computes the bitwise XOR of two integer values and returns an integer.

堆栈转换行为顺序如下: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 从堆栈中弹出,并计算按位 XOR。value2 and value1 are popped from the stack and their bitwise XOR computed.

  4. value2value1 的按位 XOR 推送到堆栈上。The bitwise XOR of value2 and value1 is pushed onto the stack.

@No__t-0 指令计算堆栈顶部两个值的按位 XOR,并将结果保留在堆栈上。The xor instruction computes the bitwise XOR of the top two values on the stack and leaves the result on the stack.

Xor 是特定于整数的操作。Xor is an integer-specific operation.

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

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

适用于