C# BigInteger Equality(BigInteger, Int64)
Description
BigInteger Equality(BigInteger, Int64)
Returns a value
that indicates whether a BigInteger value and a signed long integer value
are equal.
Syntax
BigInteger.Equality(BigInteger, Int64)
has the following syntax.
public static bool operator ==(
BigInteger left,
long right
)
Parameters
BigInteger.Equality(BigInteger, Int64)
has the following parameters.
left
- The first value to compare.right
- The second value to compare.
Returns
BigInteger.Equality(BigInteger, Int64)
method returns true if the left and right parameters have the same value; otherwise, false.
Example
using System;/*from www . j av a 2s .c o m*/
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(bigNumber == number);
}
}
The code above generates the following result.