C# BigInteger Equality(BigInteger, BigInteger)
Description
BigInteger Equality(BigInteger, BigInteger)
Returns
a value that indicates whether the values of two BigInteger objects are equal.
Syntax
BigInteger.Equality(BigInteger, BigInteger)
has the following syntax.
public static bool operator ==(
BigInteger left,
BigInteger right
)
Parameters
BigInteger.Equality(BigInteger, BigInteger)
has the following parameters.
left
- The first value to compare.right
- The second value to compare.
Returns
BigInteger.Equality(BigInteger, BigInteger)
method returns true if the left and right parameters have the same value; otherwise, false.
Example
using System;/*ww w . jav a2s .com*/
using System.IO;
using System.Numerics;
public class Example
{
public static void Main()
{
BigInteger number1 = 123123;
BigInteger number2 = 123123;
BigInteger number3 = 123123;
Console.WriteLine(number1 == number2);
Console.WriteLine(number1 == number3);
}
}
The code above generates the following result.