📜  c# 清除文本框 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:20.835000             🧑  作者: Mango

代码示例2
private void ClearTextBoxes()
 {
     Action func = null;

     func = (controls) =>
         {
             foreach (Control control in controls)
                 if (control is TextBox)
                     (control as TextBox).Clear();
                 else
                     func(control.Controls);
         };

     func(Controls);
 }