遍历panel里包含的控件
在写一个小程序需要用到,百度找不到,google找到了还是英文的。Markabel程序代码:
public void updateQuestions() { try { foreach (Control c in editQuestionsPanel.Controls) { if (c is TextBox) { TextBox questionTextBox = (TextBox)c; string question = questionTextBox.Text; writeNewQuestionToTblQuestions(question); } } } catch (Exception err) { Console.WriteLine(err.Message); } }