I am trying to make a dynamical assignment to an array as it follows:
int var_1 = 10;
int var_2 = 100;
int var_3 = 1000;
int[] arr = new int[3];
for (int i = 0; i < 3; i++)
{
arr[i] = var_**i**;
}
I've already seen that it is a question quite similar in Adding a number to variable names in C# but I will need something less complex, since they are working with classes and me just with variables and vectors.
Does anybody have an idea how to implement that in a easy way? Thanks a lot!