Yen69
Messages postés8Date d'inscriptionlundi 13 novembre 2000StatutMembreDernière intervention 7 mai 2005
-
7 mai 2005 à 10:31
Yen69
Messages postés8Date d'inscriptionlundi 13 novembre 2000StatutMembreDernière intervention 7 mai 2005
-
7 mai 2005 à 11:59
cs_Bidou
Messages postés5487Date d'inscriptiondimanche 4 août 2002StatutMembreDernière intervention20 juin 201361 7 mai 2005 à 11:04
Salut,
Tu ne peux pas convertir un "5+1" en entier, tout simplement parce que la chaîne de caractère "5+1" n'est pas un entier. Par contre, tu peux convertir "6" en entier, car 6 est un entier.
int hello 5+1; // hello 6string hello2 hello.ToString(); // hello2 "6"int k Convert.ToInt32(hello2); // k 6
Console.WriteLine("{0:N0}", k); // Ecrit 6