Hi,
Try this:
Dictionary<string, TextBox> textBoxDictionary = new Dictionary<string, TextBox>();
public Form1()
{
InitializeComponent();
textBoxDictionary.Add("textBox1", textBox1);
textBoxDictionary.Add("textBox2", textBox2);
textBoxDictionary.Add("textBox3", textBox3);
...
}
Now, to set the text of a specific text box, try this:
int k = 15;
textBoxDictionary["textBox" + k.ToString()].Text = "some text";
Hope this helps.