lundi 22 décembre 2014

C# - Use too many buttons as 1 variable


I Have Very Big Question. i want to use 15 buttons to change them background Color but is very big code



button1.backgroundColor = Color.black
button2.backgroundColor = Color.black
.
.
.


and my question is how i can use all buttons as 1 variable ? like :



var allButtons = { button1.backgroundColor, button2.backgroundcolor .... }


thanks.





Aucun commentaire:

Enregistrer un commentaire