I would like to build a method or extension method that takes multiple lists and combines them in the following way:
Lets say i have two lists:
int[] list1 = {3, 1, 2};
int[] list2 = {5, 4 };
I would expect a list of arrays as a result like this:
[1,4]
[1,5]
[2,4]
[2,5]
[3,4]
[3,5]
The number of columns in my resulting list of arrays would be determined by the amount of lists passed and both columns need to be sorted. The number of rows is just the (length of list A) * (length of list B) * (length of list N)
In this example is 3 * 2 = 6 rows. 2 columns (because 2 input lists).
What would be an elegant way of doing this with linq?
Thanks!