private void button1_Click(object sender, System.EventArgs e)
{
OperateControls(this);
}
public void OperateControls(Control c)
{
if(c.Controls!=null)
{
foreach(Control txt in c.Controls)
{
if(txt is System.Windows.Forms.TextBox)
{
txt.Text =String.Empty;
}
else
{
OperateControls(txt);
}
}
}
}
{
OperateControls(this);
}
public void OperateControls(Control c)
{
if(c.Controls!=null)
{
foreach(Control txt in c.Controls)
{
if(txt is System.Windows.Forms.TextBox)
{
txt.Text =String.Empty;
}
else
{
OperateControls(txt);
}
}
}
}