I am new to C# and just started to learn how to code. I was trying to convert and sum an amounts for several items displayed in a label, then displays the total in another label.I used parse to convert the values to double ,but I've frequently got an error message saying that"cannot implicitly convert type int to string.Here is a sample of my code.
int Cost;
double total = 0;
costLabel.Text = Convert.ToInt32(priceLabel2.Text);
Cost = int.Parse(priceLabel2.Text);
total += double.Parse(priceLabel2.Text);
costLabel.Text = total.ToString("c");
can any one help me to solve this problem?