Je veux faire un nombre à un million. Ceci est mon code:Chaîne de formatage de nombres
string formating = "#,#,,";
decimal abc = 1234567890m;
decimal abc2 = 0m;
string text = abc.ToString(formating); // text="1,235"
string text2 = abc2.ToString(formating); // text2=""
Comment corriger la mise en forme de telle sorte que text2="0"
?
P/S: J'utilise C# .Net 2.0.
Qu'est-ce que vous essayez de faire? –
Veuillez corriger ma chaîne de formatage, car si abc2 = 0, text2 = "", mais je veux text2 = "0". Merci. –