im trying to remove a value when a checkbox is unchecked. My Code:
var words = new List<string>();
if (ckbAnswer1.Checked)
words.Add(" -A,");
if (ckbAnswer2.Checked)
words.Add("B,");
if (ckbAnswer3.Checked)
words.Add("C");
treeView1.SelectedNode.Text += treeView1.SelectedNode.Text +string.Join(" ", words);
Return Question 1 - A,B,C
, but, say i want to uncheck "A", which should remove it from Question 1 - A,B,C
. How do i do that?
Aucun commentaire:
Enregistrer un commentaire