The code looks like this:
private void button1_Click(object sender, EventArgs e)
{
bet = int.Parse(textBox1.Text);
}
It works fine when the textbox contains whole numbers like 10, 5, 6, etc. But with decimals like 10,5 it always returns:
system.formatexception 'input string was not in a correct format.'
Any help is much appreciated!