C# BigInteger Inequality(UInt64, BigInteger)
Description
BigInteger Inequality(UInt64, BigInteger)
Returns
a value that indicates whether a 64-bit unsigned integer and a BigInteger
value are not equal.
Syntax
BigInteger.Inequality(UInt64, BigInteger)
has the following syntax.
public static bool operator !=(
ulong left,
BigInteger right
)
Parameters
BigInteger.Inequality(UInt64, BigInteger)
has the following parameters.
left
- The first value to compare.right
- The second value to compare.
Returns
BigInteger.Inequality(UInt64, BigInteger)
method returns true if left and right are not equal; otherwise, false.
Example
//from w ww . java 2s.c om
using System;
using System.IO;
using System.Numerics;
public class Example
{
public static void Main()
{
BigInteger bigNumber = BigInteger.Pow(2, 63) - BigInteger.One;
ulong uNumber = Int64.MaxValue & 0x7FFFFFFFFFFFFFFF;
Console.WriteLine(uNumber != bigNumber);
}
}
The code above generates the following result.