I have a list of checkboxes List<CheckBox> checkBoxesList = new List<CheckBox>();
and I am having trouble figuring out how to figure out when all 4 checkboxes, that I have, are all disabled.
Here is what I have.
public void CheckIfBoxHasBeenSelected()
{
List<CheckBox> checkBoxesList = new List<CheckBox>();
checkBoxesList.Add(checkBox1);
checkBoxesList.Add(checkBox2);
checkBoxesList.Add(checkBox3);
checkBoxesList.Add(checkBox4);
foreach (CheckBox item in checkBoxesList)
{
if (item.Checked)
{
item.Enabled = false;
}
}
}
Thank you for advice
Aucun commentaire:
Enregistrer un commentaire