Hypocritically speaking I have a job that is creating ideas for my clients. For one client I have a list of suggestions, from which I created checkboxs accordingly. Now I need to know which of those are unchecked by the client, so I can delete them.
-The number of suggestions is not fixed. The number is the length of my current SuggestionList.
int checkboxnumber = Myclass.suggestionline.Count();
for (int i = 0; i < checkboxnumber; i++)
{
CheckBox cb = new CheckBox();
cb.Text = Myclass.suggestionline[i][0];
cb.Location = new Point(5, 5 + i * 24);
cb.BackColor = Color.White;
cb.Name = "checkbox"+i;
cb.AutoSize = true;
cb.Checked = true;
panel1.Controls.Add(cb);
};
I structured my SuggestionList as List < List < string > >, a 4 suggestions SuggestionList example would be :
{{"suggestion1", "like", "100 Euro"},{"suggestion2", "like", "200 Euro"},{"suggestion3", "like", "300 Euro"},{"suggestion4", "like", "400 Euro"}}