forthis instead of foreach
hi
jorndel already gave me this code:
but this was to overrun all checkboxes in the form, can i do something like forthis (Control C in this.Controls) ?
so i just have the value of the checkbox i just changed (i don't mind to manualy add an integer if nescecary
thx
jorndel already gave me this code:
Code:
foreach (Control C in this.Controls)
{
if (C is CheckBox)
{
CheckBox CheckBoxC = C as CheckBox;
if (CheckBoxC.Checked)
{
int Che = int.Parse(CheckBoxC.Name.Replace("checkBox", ""));
}
}
}
so i just have the value of the checkbox i just changed (i don't mind to manualy add an integer if nescecary
thx