I get the error: 'Input string was not in a correct format'..... I am running an if else calculation and then populating a label with the result the variable is declared as decimal then ToString('C') to the label...
List<string> moneyWon = new List<string>();
private void calculateAmountWon()
{
moneyWon.Add(amountWonlabel.Text);
decimal won = moneyWon.Sum(str => Convert.ToInt32(str));
moneyWonLabel.Text = won.ToString("C");
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}