C# BigInteger Equality(Int64, BigInteger)

Description

BigInteger Equality(Int64, BigInteger) Returns a value that indicates whether a signed long integer value and a BigInteger value are equal.

Syntax

BigInteger.Equality(Int64, BigInteger) has the following syntax.


public static bool operator ==(
  long left,
  BigInteger right
)

Parameters

BigInteger.Equality(Int64, BigInteger) has the following parameters.

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

Returns

BigInteger.Equality(Int64, BigInteger) method returns true if the left and right parameters have the same value; otherwise, false.

Example


/*from www  . j  ava  2  s  .c o  m*/
using System;
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger bigNumber = BigInteger.Pow(2, 63);
        long number = Int64.MaxValue;
        Console.WriteLine(number == bigNumber);
    
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex