I want to create a flat result set from the results of two methods in which the results of the first are the arguments for the second.
For example, method 1 returns 1,2,3 and I want to feed each int into method 2, which just returns 4,5,6 every time.
So I expect back a resultset like 1:4, 1:5, 1:6, 2:4, 2:5, 2:6, 3:4, 3:5, 3:6
If possible, I want to do this in a single LINQ query (pref c#).
I hope this explanation is clear and someone can help me.
EDIT:
I shouldn’t have asked. This is easy. For anyone else who needs it:
int[] aList = new int[] { 1, 2, 3 };
var enumerable = from a in aList
from b in GetResult(a)
select new { x = a, y = b };
Using LINQ expressions