In functional programming, this is called zip . Now it is available as embedded .NET 4.0, but you can write it yourself. Their announcement:
public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>( this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> func);
You will get something like:
var results = a.Zip(b, (x,y) => new { itemA = x, itemB = y });
Although it is in 4.0, the function can be easily implemented independently.
source share