Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

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

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);
      }
   }
}

No comments yet.

Leave a Comment