C# BigInteger OnesComplement
Description
BigInteger OnesComplement
Returns the bitwise one's
complement of a BigInteger value.
Syntax
BigInteger.OnesComplement
has the following syntax.
public static BigInteger operator ~(
BigInteger value
)
Parameters
BigInteger.OnesComplement
has the following parameters.
value
- An integer value.
Returns
BigInteger.OnesComplement
method returns The bitwise one's complement of value.
Example
/* www . j a v a2s . c o m*/
using System;
using System.Numerics;
public class Example
{
public static void Main()
{
BigInteger value, complement;
value = BigInteger.Multiply(BigInteger.One, 9);
complement = ~value;
value = BigInteger.MinusOne * SByte.MaxValue;
complement = ~value;
}
}