Answer the question
In order to leave comments, you need to log in
How to add a unit to the existing value in the Label?
The form has "label1" and "+" and "-" buttons.
How to make it so that when you click on the "+" button, the value in "label1" increases by one, up to nine.
I know it's not that hard, but I can't.
private void Button_Click_2(object sender, RoutedEventArgs e)
{
int t= 1;
if (t < 9)
{
t++;
label1.Content = t.ToString();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question