I have the following two arrays
var employeeIds = new [] {1, 2, 3, 4};
var employeeNames = new [] {"Sarah", "Connor", "Julia", "Igor" };
I need to Zip them so I can combine the above to array such that the employeeId at index n is combined with employeeName at index n. So I can get anonymous objects like the following
combinedArrays.Select(items => new {Id = items.Item0, Name = items.Item1 });
How do I do that in Linq? If I could get Index in Linq, that would've done it but IEnumerable is not an ordered collection so there is no indexes.