2014-09-28 4 views

ответ

9

Вы можете использовать Linq.Zip

var students = new[] { "Elisa", "Sarah", "Frank", "Frederic" }; 
var votes = new[] { 90, 70, 40, 80 }; 
var studendsAndVotes = students.Zip(votes, (student, vote) => student + " " + vote); 

из MSDN
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.

+2

Это было быстро .. '+ 1' –

+0

спасибо, что было слишком легко – dav

Смежные вопросы