C# BigInteger BitwiseAnd

Description

BigInteger BitwiseAnd Performs a bitwise And operation on two BigInteger values.

Syntax

BigInteger.BitwiseAnd has the following syntax.


public static BigInteger operator &(
  BigInteger left,
  BigInteger right
)

Parameters

BigInteger.BitwiseAnd has the following parameters.

  • left - The first value.
  • right - The second value.

Returns

BigInteger.BitwiseAnd method returns The result of the bitwise And operation.

Example


/*w w  w  .  ja va  2 s .  c o m*/
using System;
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger number1 = BigInteger.Add(Int64.MaxValue, Int32.MaxValue);
        BigInteger number2 = BigInteger.Pow(Byte.MaxValue, 10);
        BigInteger result = number1 & number2;
        Console.WriteLine(result);
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex