C# BigInteger RightShift
Description
BigInteger RightShift
Shifts a BigInteger value a specified
number of bits to the right.
Syntax
BigInteger.RightShift
has the following syntax.
public static BigInteger operator >>(
BigInteger value,
int shift
)
Parameters
BigInteger.RightShift
has the following parameters.
value
- The value whose bits are to be shifted.shift
- The number of bits to shift value to the right.
Returns
BigInteger.RightShift
method returns A value that has been shifted to the right by the specified number of bits.
Example
//from w w w . j a v a 2s .c o m
using System;
using System.IO;
using System.Numerics;
public class Example
{
public static void Main()
{
BigInteger number = BigInteger.Parse("-12312312312312312");
Console.WriteLine(number >>2 );
}
}
The code above generates the following result.