Bazı durumlarda kullanıcıların form üzerine çalışma zamanında textbox eklemesi ve daha sonrada dinamik olarak oluşturulan textbolara girilen bilgileri okuması gerekebilir. Böyle bir durumda aşağıdaki kodlar yardımınıza koşacaktır.

int c = 0;
//Eklenecek Listboxları tutacak liste
List<TextBox> textboxlar = new List<TextBox>();
private void ekle_Click(object sender, EventArgs e)
{
//Yeni textbox ekleniyor
TextBox yenitext = new TextBox();
c++;
yenitext.Location = new System.Drawing.Point(20, 22 + (20 * c));
yenitext.Size = new System.Drawing.Size(125, 25);
this.Controls.Add(yenitext);
textboxlar.Add(yenitext);
}
private void oku_Click(object sender, EventArgs e)
{
//Eklenen textboxların içerikleri okunuyor.
foreach (TextBox textBox in textboxlar)
{
string value = textBox.Text;
listBox1.Items.Add(value);
}
}

