Say I have the following data
IEnumerable<IEnumerable<int>> items = new IEnumerable<int>[] { new int[] { 1, 2, 3, 4 }, new int[] { 5, 6 }, new int[] { 7, 8, 9 } };
What would be the easiest way to return a flat list with elements alternating so that I get the result:
1, 5, 7, 2, 6, 8, 3, 9, 4
Note. The number of internal lists is unknown at runtime.
Cameron MacFarland
source share