1
I need a loop for 2 Labels where each one appears a text already specified in the code. Just out of curiosity. I wanted a loop with the same effect as the code below:
private void button1_Click(object sender, EventArgs e)
{
lbl_1.Text = "Ziummmmmm";
++NumberOfClick;
switch(NumberOfClick)
{
case 1:
lbl_1.Text = "Ziummmmmm";
break;
case 2:
lbl_2.Text = "Ploft";
break;
case 3:
lbl_1.Text = "";
lbl_2.Text = "";
break;
}
}
I’m trying to make a loop, but it’s incomplete and I don’t know how to continue, any help I accept.
while (lbl_1.Text == "Ziummmmmm")
{
lbl_2.Text = "Ploft";
while (lbl_2.Text == "Ploft")
{
lbl_1.Text = "";
lbl_2.Text = "";
}
}
Now I get it, thank you very much man, it worked out :D!!
– Pedro Sanches
Don’t forget to accept my answer as correct! Wow.
– Ericson Willians