I have some code that I just don't understand why it's not working. I am using C#, current in visual studio.
I have two check boxes, and one button. When the button is clicked, it has two if statements:
void worker_DoWork(object sender, DoWorkEventArgs e)
{
If (checkbox_A.checked == true)
{
do work
}
if (checkbox_B.checked == true)
{
do work
}
}
What's weird is that if you select JUST checkbox A, it works fine. If you select JUST checkbox B, it works fine. however, if you select them both, it will do checkbox A work, then just end. it never makes it to checkbox B for some odd reason. Is there anything I can check, because logically the code should work, and does work individually, but it just skips the next part entirely despite both being true.
Aucun commentaire:
Enregistrer un commentaire