Outils pour utilisateurs

Outils du site


lang:csharp:nombres

Ceci est une ancienne révision du document !


Conversion d'un nombre entier en hexadécimal et inversement

// Store integer 182
int intValue = 182;
// Convert integer 182 as a hex in a string variable
string hexValue = intValue.ToString("X");
// Convert the hex string back to the number
int intAgain = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);

Source, Archive

lang/csharp/nombres.1471615710.txt.gz · Dernière modification : 2016/08/19 16:08 de root