cs_aurelie
Messages postés87Date d'inscriptionlundi 22 avril 2002StatutMembreDernière intervention12 octobre 2006
-
23 juin 2004 à 17:50
cs_coq
Messages postés6349Date d'inscriptionsamedi 1 juin 2002StatutMembreDernière intervention 2 août 2014
-
8 oct. 2004 à 16:51
J'aimerais convertir une chaine sous la forme "0x0004" en hexadecimal, mais je n'arrive pas à le faire. Quelqu'un pourrait-il m'aider? Merci d'avance.
Aurélie
cs_coq
Messages postés6349Date d'inscriptionsamedi 1 juin 2002StatutMembreDernière intervention 2 août 2014101 23 juin 2004 à 18:23
fausse manip ^^
par exemple :
string nombre = "0x0004F";
if ( nombre.Substring(0,2) == "0x" )
nombre = nombre.Remove(0,2);
int nb = int.Parse(nombre, System.Globalization.NumberStyles.HexNumber);