this.TextBox1.Visible = true;
大家都能看明白是什么意思吧,但是现在的问题是,TextBox1我想让他是变化的,我写个方法 把TextBox1传进去,或者把1传进去,然后进行对TextBox进行判断
原数据是下面这样的:
this.TextBox1.Visible = true;
this.TextBox2.Visible = true;
this.TextBox3.Visible = true;
this.TextBox4.Visible = true;
this.TextBox5.Visible = true;
this.TextBox6.Visible = true;
this.TextBox7.Visible = true;
this.TextBox8.Visible = true;
我想写成
private void Formats(string ids)
{
this.TextBox+ids.Visible = false;//也就是this.TextBox1.Visible = true;
}
或
private void Formats(string ids)
{
this.ids.Visible = false;
}
有高手帮个小忙啊