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;
}

i think the problem with this code is that every time you click this button, it resets label to 0. so everytime you click the button, it does label.Content = numTextbox (user input) + numLabel (which is always 0). you only want the label to output 0 once, thats when the program starts.


label.Content = 0;

private void method1{
int numTextbox = Int32.Parse(numBox.Text);
int limit = Int32.Parse(limitBox.Text);
int numLabel = int32.Parse(label.Text);

if (numTextbox <= limit) label.Content = numTextbox + numLabel;
}