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 ; }
}`在这里插入代码片`
请编程遍历WinForm页面上所有TextBox控件并给它赋值为string.Empty
最新推荐文章于 2021-07-18 00:34:29 发布