Hi all, i am looking to convert dollar to local currency of my country (Cfa), i use combobox, the result i get example on the catch is wrong

here is my code:
- private void button2_Click(object sender, EventArgs e)
- {
- int selectIndex = dev1.SelectedIndex;
- int money = int.Parse(mnt1.Text);
- int rate = int.Parse(mnt2.Text);
- if (dev1.SelectedItem.ToString()=="Dollar" && dev2.SelectedItem.ToString()=="Cfa")
- {
- int conversion = money * rate;
- int convStr = Convert.ToInt32(conversion);
- total.Text = convStr.ToString();
- }
thank you for helping me see a little clearer


Salman BegRank #284 · 8.8K reputationPosted Feb 9, 2019, 3:30 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Feb 9, 2019, 6:49 AM EST