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

Amit GuptaPosted Feb 9, 2019, 11:49 AM
Salman BegPosted Feb 9, 2019, 8:30 AM