samedi 23 novembre 2019

Is there a better way to run through radio buttons in an if statement?

I am new to C#. I want to find a faster way to run through a large number of radio buttons to see if they are checked or not. Here is my code now:

if(radibutton1.checked == true && radiobutton2.checked== true) {
   //Do something
}

Is there a better way to do this, because, with all my radio buttons, there will be many if statements and I worry that the way I am doing it now will slow down my app. enter image description here

Aucun commentaire:

Enregistrer un commentaire