If i type 6 into the textbox and click on the button, the label will turn into 6(so far good). But when i want to add 4 to the 6 it doesn't change to 10.
Can someone tell me what i'm doing wrong here? I've looked the net for many hours without luck.
Code:
private void button_Click(object sender, RoutedEventArgs e)
{
int aantaltextBox = Convert.ToInt32(textBox.Text);
int limiet = Convert.ToInt32(textBox1.Text);
int aantallabel = Convert.ToInt32(label.Content=0);
while (aantallabel < limiet)
{
label.Content = aantallabel + aantaltextBox;
}
}
'Max'(limiet) means the label cant go over 20.