标签:
//遍历窗体控件并给控件赋值
private void Control_Load(object sender, EventArgs e)
{
foreach (Control Ctr in this.Controls)
{
if (Ctr is System.Windows.Forms.CheckBox)
{
checkBox1.Checked = true;
}
else if (Ctr is TextBox)
{
this.textBox1.Text = "赋值数据";
}
}
}
标签:
原文地址:http://www.cnblogs.com/andyhuo/p/5094078.html