names.SelectedIndexChanged += delegate { if (btn.Name.StartsWith("1")) ptsValue = 100; else if (btn.Name.StartsWith("2")) ptsValue = 200; else if (btn.Name.StartsWith("3")) ptsValue = 300; else if (btn.Name.StartsWith("4")) ptsValue = 400; else if (btn.Name.StartsWith("5")) ptsValue = 500; else ptsValue = 600; int score = 0; for (int i = 0; i < NamesFLC; i++) { if (String.Compare(tableofNames[i], (string)names.SelectedItem, StringComparison.OrdinalIgnoreCase) == 0) { score = tableofPoints[i]; score += ptsValue; tableofPoints[i] = score; } } QuestionBox.Controls.Remove(names); QuestionBox.Controls.Remove(cls); QuestionBox.Controls.Remove(question); this.Controls.Remove(btn); QuestionBox.Close(); };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)