- Inscription
- 2 Février 2014
- Messages
- 793
- Réactions
- 681
- Points
- 6 096
Alors voilà j'essaie de créer une appli pour connaitre le cours du Bitcoin en € sauf que j'ai une erreur à la ligne ou j'ai ma note..
Code:
private void button2_Click(object sender, EventArgs e)
{
WebClient BTCToEur = new WebClient();
string BTCValue1 = BTCToEur.DownloadString("https://blockchain.info/tobtc?currency=EUR&value=1");
decimal BTCDecimal = System.Convert.ToDecimal(BTCValue1); // le problème est que je souhaite passer de string en Decimal pour effectuer un opération
BTCDecimal = 1 / BTCDecimal;
string BTCValue2 = BTCDecimal.ToString();
label5.Text = BTCValue2 + " €";
}