Convertir un String en un type spécifique de ‘Biginteger’

Author:

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

using System;
using System.Globalization;
using System.Numerics;

public class ConversionBigInt
{
   public static void Main()
   {
      string[] stringHex = { "80", "0080", "00E293", "00F9A2FF", "00FFFFFFFF" };
      foreach (string pertStr in stringHex)
      {
         BigInteger nombre = BigInteger.Parse(pertStr, NumberStyles.AllowHexSpecifier);
         Console.WriteLine("0x{0} Converti en {1}.", pertStr, nombre);
      }
   }
}

Leave a Reply

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