How to populate
List<TextBox> textBoxList = new List<TextBox>();
Is it possible to populate to textBoxList with 5 textboxes and the text the boxes contain say
textBox1.Text
textBox2.Text
textBox3.Text
textBox4.Text
textBox5.Text
and then I’m planning to populate this like
for(int i=1;i<6;i++)
{ //x is a string collection
x[i]=textBox[i].Text= // some action
}
Your question is “is it possible”? Answer: Yes, it is.
How? Well, you need to add your textboxes to your List before you can reference them:
OR