Функция объединяет две последовательности.
Main.cs
using System; //добавить ссылку using System.Linq; class Program { public static int Main() { int[] ara1 = new int[] { 1, 2, 3, 4, 5}; string[] ara2 = new string[] { "one", "two", "three", "four", "five" }; var query = ara1.Zip(ara2, (a, b) => a + " " + b); foreach(var i in query) { Console.WriteLine("{0} ", i); } Console.ReadKey(); return 0; } }
using System; //добавить ссылку using System.Linq; class Program { public static int Main() { int[] ara1 = new int[] { 1, 2, 3, 4, 5}; string[] ara2 = new string[] { "one", "two", "three", "four", "five" }; var query = ara1.Zip(ara2, (a, b) => a + " " + b); foreach(var i in query) { Console.WriteLine("{0} ", i); } Console.ReadKey(); return 0; } }
1 one
2 two
3 three
4 four
5 five
2 two
3 three
4 four
5 five