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

[ad_1]

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();

[ad_2]

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