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);
Utiliser des nombres en représentation binaire
On ne peut pas encore (c#7 peut-être). Une alternative : Convert.ToInt32(“1000111001”, 2);
lang/csharp/nombres.1471947191.txt.gz · Dernière modification : 2016/08/23 12:13 de root