天天看点

一个遍历

遍历页面上所有的Textbox并且让他为string.Empty

foreach (System.Windows.Forms.Control control in this.Controls) 

    if (control is System.Windows.Forms.TextBox) 

    { 

        System.Windows.Forms.TextBox tb = (System.Windows.Forms.TextBox)control ; 

        tb.Text = String.Empty ; 

     } 

}

继续阅读