Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<CheckBox> checkBoxes = new List<CheckBox>();
- checkBoxes.Add(checkBox1);
- checkBoxes.Add(checkBox2);
- checkBoxes.Add(checkBox3);
- checkBoxes.Add(checkBox4);
- foreach (var c in checkBoxes)
- {
- if (c is CheckBox)
- {
- CheckBox chk = (CheckBox)c;
- if (chk.Checked)
- {
- literyDoUczenia.ListOfInput.Add(1);
- }
- else
- {
- literyDoUczenia.ListOfInput.Add(0);
- }
- }
- }
- MessageBox.Show(literyDoUczenia.ListOfInput[1] + "");
- MessageBox.Show(literyDoUczenia.ListOfInput[2] + "");
- MessageBox.Show(literyDoUczenia.ListOfInput[3] + "");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement