I will say the following arrays ..
int[] array_1 = new int[1] { 2 };
int[] array_2 = new int[2] { 3, 4 };
int[] array_3 = new int[3] { 7,5, 6 };
int combinations;
combinations = array_1.Length * array_2.Length * array_3.Length;
what I want to do is create a new array, where each column will contain elements from each of the above arrays and the number of rows will be a combination of all the elements of the array above. in this case, the number of columns is 3 (because I have 3 arrays), and the number of columns is 6, since the combination of all the elements is 1 * 2 * 3 = 6. So, my new array will be:
int array_num = 3;
int[,] comb = new int[combinations, array_num];
I want to populate each column as follows: The first column will contain the elements of array_1 that will change each
int c0 = (combinations / array_1.Length);
elements. the second column will contain elements from array_2, which will change each
int c1=(c0/array_2.Length);
elements. And the third column will contain the elements from thw array_3 that will change each
int c2=(c1/array_3.Length);
.
:
2 3 7
2 3 5
2 3 6
2 4 7
2 4 5
2 4 6
, , , , .