I have 5 label that I created by drag & drop on the form. Is there an array of these labels (that’s already created) that I can use?
If I wanted to enter text into all these label for example, would I able to do it through creating a loop and assign each element of labels array a particular text?
The short answer is “no”. There is no array already created for just the 5 labels you created using drag and drop.
You can iterate through all the children of a form (and recursively for controls placed on container controls on your form), but you would get back all the controls on the form and not just the 5 labels.
You could use a specific naming for these labels – like
label_1,label_2,label_3,label_4,label_5and filter based on.Name.Starts("label_")to allow you to update these labels specifically.Does this help?