Il semble que String.Format ne sera pas formater une chaîne en entrée. Est-ce que je fais quelque chose de mal, ou est-ce juste un comportement natif?String.Format ne formate pas une chaîne
Entrée: 0,37
Cela ne fonctionne pas.
string x = String.Format("{0:P}", myString)
Sortie: 0,37
Cela fait.
string x = String.Format("{0:P}", Convert.ToDecimal(myString))
Sortie: 37,00%