# BigInteger.BitwiseOr(BigInteger, BigInteger) 运算符

## 定义

``````public:
static System::Numerics::BigInteger operator |(System::Numerics::BigInteger left, System::Numerics::BigInteger right);``````
``public static System.Numerics.BigInteger operator | (System.Numerics.BigInteger left, System.Numerics.BigInteger right);``
``static member ( ||| ) : System.Numerics.BigInteger * System.Numerics.BigInteger -> System.Numerics.BigInteger``
``Public Shared Operator Or (left As BigInteger, right As BigInteger) As BigInteger``

left
BigInteger

right
BigInteger

## 注解

BitwiseOr 方法定义 BigInteger 值的按位 `Or` 运算。The BitwiseOr method defines the bitwise `Or` operation for BigInteger values. 仅当设置了 `left``right` 中的一个或两个对应位时，按位 `Or` 运算才设置结果位，如下表所示。The bitwise `Or` operation sets a result bit only if either or both of the corresponding bits in `left` and `right` are set, as shown in the following table.

`left` 中的位Bit in `left` `right` 中的位Bit in `right` 结果中的位Bit in result
00 00 00
11 00 11
11 11 11
00 11 11

BitwiseOr 方法启用如下代码：The BitwiseOr method enables code such as the following:

``````BigInteger number1  = BigInteger.Parse("10343901200000000000");
BigInteger number2  = Byte.MaxValue;
BigInteger result  = number1 | number2;
``````
``````Dim number1 As BigInteger = BigInteger.Parse("10343901200000000000")
Dim number2 As BigInteger = Byte.MaxValue
Dim result As BigInteger = number1 Or number2
``````

BitwiseOr 方法对两个 BigInteger 值执行按位 `Or` 运算，就好像它们是两个都在具有虚符号扩展的两个补数表示形式中。The BitwiseOr method performs the bitwise `Or` operation on two BigInteger values as if they were both in two's complement representation with virtual sign extension.