怎么获取textbox的集合
TextBox tb = this.Controls.Find("textBox"+i,true) as TextBox;
if (tb != null)
tb.Text = a[i].ToString();
运行后显示错误“无法通过引用转换、装箱转换、取消装箱转换、包装转换或 Null 类型转换将类型“System.Windows.Forms.Control[]”转换为“System.Windows.Forms.TextBox””,请问怎么修改啊?
------解决方案--------------------TextBox tb = this.Controls.Find("textBox"+i,true)
=>
TextBox tb = this.Controls.Find("textBox"+i,true)[0]