B
B
Bream23192020-07-03 11:06:49
C++ / C#
Bream2319, 2020-07-03 11:06:49

Is it possible to automatically assign values ​​to variables in an array?

I have an array
string[] namebaz = new string[25];
{
namebase[0] = textBox1.Text;
namebase[1] = textBox2.Text;
}
The content of the textBox is assigned to each variable.
It can be organized in some other way.
For example, if I had a hundred textBoxes, would it be necessary to manually prescribe each variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2020-07-03
@Bream2319

The studio will automatically generate a list of all components on the form in Components. Select your textboxes from there, sort them and fill the array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question