2
How to put a secondary function on a button or element? For example :
private void Bnt1_Click(object sender, EventArgs e)
{
}
private void Bnt2_Click(object sender, EventArgs e)
{
bnt.Enabled = false;
}
In this code, when clicking Bnt2 the first button is disabled, how to do so so that when you click Bnt2 again Bnt1 is active again.
Ps: If something has not become clear warn and I will change.
Ps2: The secondary function refers to the conditional part, "otherwise".
What do you call a secondary function of a button? Would it fire two distinct logics at the same time?
– Jefferson Quesado
I expressed myself badly Jefferson, I wanted to talk about conditional(if & Else) but I ended up getting confused.
– user61171
Ah, I get it now. I know that João Silva’s answer is exactly about this, but it would be even better if you put this in the question too, even to serve as a basis if someone else finds your same difficulty
– Jefferson Quesado