C# BigInteger BigInteger(Byte[])

Description

BigInteger BigInteger(Byte[]) Initializes a new instance of the BigInteger structure using the values in a byte array.

Syntax

BigInteger.BigInteger(Byte[]) has the following syntax.


[CLSCompliantAttribute(false)]
public BigInteger(
  byte[] value
)

Parameters

BigInteger.BigInteger(Byte[]) has the following parameters.

  • value - An array of byte values in little-endian order.

Example


using System;//ww w . ja  v a2  s .c  o  m
using System.Numerics;

public class Example
{
   public static void Main()
   {
        byte[] bytes = { 5, 4, 3, 2, 1 };
        BigInteger number = new BigInteger(bytes);
        Console.WriteLine("The value of number is {0} (or 0x{0:x}).", number); 

   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex