BigInteger.BitwiseAnd(BigInteger, BigInteger) Operador
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Executa uma operação And
bit a bit em dois valores 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) = System::Numerics::IBitwiseOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>::op_BitwiseAnd;
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 And (left As BigInteger, right As BigInteger) As BigInteger
- left
- BigInteger
O primeiro valor.
- right
- BigInteger
O segundo valor.
O resultado da operação And
bit a bit.
O BitwiseAnd método define a operação bit a bit And
para BigInteger valores. A operação bit a bit And
define um bit de resultado somente se os bits correspondentes em left
e right
também estiverem definidos, conforme mostrado na tabela a seguir.
Bit in left |
Bit in right |
Bit no resultado |
---|---|---|
0 | 0 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
0 | 1 | 0 |
O BitwiseAnd método habilita o código como o seguinte:
BigInteger number1 = BigInteger.Add(Int64.MaxValue, Int32.MaxValue);
BigInteger number2 = BigInteger.Pow(Byte.MaxValue, 10);
BigInteger result = number1 & number2;
let number1 = BigInteger.Add(Int64.MaxValue, Int32.MaxValue)
let number2 = BigInteger.Pow(Byte.MaxValue, 10)
let result = number1 &&& number2
Dim number1 As BigInteger = BigInteger.Add(Int64.MaxValue, Int32.MaxValue)
Dim number2 As BigInteger = BigInteger.Pow(Byte.MaxValue, 10)
Dim result As BigInteger = number1 And number2
O BitwiseAnd método executa a operação bit a bit And
em dois BigInteger valores como se ambos estivessem na representação complementar de dois com a extensão de sinal virtual.
Produto | Versões |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: