C# BigInteger BitwiseOr

Description

BigInteger BitwiseOr Performs a bitwise Or operation on two BigInteger values.

Syntax

BigInteger.BitwiseOr has the following syntax.


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

Parameters

BigInteger.BitwiseOr has the following parameters.

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

Returns

BigInteger.BitwiseOr method returns The result of the bitwise Or operation.

Example

Performs a bitwise Or operation on two BigInteger values.


/*w  ww .  j  av a 2  s  .c  o  m*/
using System;
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger number1  = BigInteger.Parse("123123123123123123123");
        BigInteger number2  = Byte.MaxValue;
        BigInteger result  = number1 | number2;
        Console.WriteLine(result);
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex