public partial class Form1 : Form { TextBox[][] Rack; public Form1() { InitializeComponent(); Rack = new TextBox[][] { new TextBox[] {textBoxAA, textBoxAB, textBoxAC, textBoxAD }, new TextBox[] {textBoxBA, textBoxBB, textBoxBC, textBoxBD }, new TextBox[] {textBoxCA, textBoxCB, textBoxCC, textBoxCD } }; } private void button1_Click(object sender, EventArgs e) { ProcessRack(2); } void ProcessRack(int nr) { for (int box = 0; box < Rack[nr].Length-1; box++) { Rack[nr][box].Text = "Processed: " + box.ToString(); } } }ProcessRack receives the line (0=AA-AD, 1=BA-BD, 2=CA-CD). The loop in the method processes all textboxes except the last one (Length-1). If you add textboxes AE and AF, the code would automatically process AA-AE. If you add further lines (DA-DD, EA-ED, etc.) those would be accessible to ProcessRack, too.