For example, I created the variables a1, a2, a3 ... a100. How to fill them in a loop, but not an array?
The fact is that I work in Windows Forms, I need to fill an array of 100 different places
For example, I created the variables a1, a2, a3 ... a100. How to fill them in a loop, but not an array?
The fact is that I work in Windows Forms, I need to fill an array of 100 different places
In fact, it is not necessary to do this, for this are used arrays.
But if you really want something you can, you need to use Reflection , but it is necessary that these variables are not locally defined in the function, but are class variables.
You can Reflection about Reflection here - https://metanit.com/sharp/tutorial/14.1.php
I created the variables a1, a2, a3 ... a100. How to fill them in a loop, but not an array?
... I need to fill an array ...
CREATE A MASSIF, CHOOSE HIS PLACE ON A CYCLE , FILLING EVERY PLACE
=)
Source: https://ru.stackoverflow.com/questions/771124/
All Articles
int a1,a2,a3,a4...then why do not you like the recordint a1=1,a2=2,a3=3,...? - nick_n_a