[Solved] c# faster way to read all textboxes/labels [closed]


You can create an array with the references to the labels:

Label[] labels = { eLabel1, eLabel2, eLabel3, ... };

Producing an array with the texts from the labels would be a one-liner:

string[] values = labels.Select(l => l.Text).ToArray();

solved c# faster way to read all textboxes/labels [closed]