var A = new[] {A, B};
var B = new[] {X, Y, Z};
var Product =
from _A in A
from _B in B
select new[] { _A, _B };
//Intent below:
foreach (pair in Product)
{
SomeFunction(pair[0],pair[1])
}
//Output:
SomeFunction(A,X)
SomeFunction(A,Y)
SomeFunction(A,Z)
SomeFunction(B,X)
SomeFunction(A,Y)
SomeFunction(A,Z)
Instead of combining the two lists into one item, how do I retrieve _A & _B as independent variables? So that for each Cartesian cross product combination (A,X..A,Y..A,Z..and so on) I can send them into another function to process?
Ideally, these variables will not be strings so any workarounds with getting character @ indicies will not work.
EDIT: Looks like I was right all along. Thank you for the community for confirming my intent.