Conversion d’un BigInteger en un tableau d’octets

Author:

Calculer,la,puissance,d'un,nombre,de,type,'BigInteger'
{filelink=20051}

using System;
using System.Numerics;

public class ExempleConversion
{
      public static void Main()
   {
       BigInteger[] nombre = { Int64.MinValue, Int64.MaxValue };
      foreach (BigInteger number in nombre)
      {
       byte[]  bytes = number.ToByteArray();
         foreach (byte byteValue in bytes)
            Console.Write("{0:X2} ", byteValue);
      }
   }

}

Leave a Reply

Your email address will not be published. Required fields are marked *