c# - What is the use of Enumerable.Zip extension method in Linq? -


what use of enumerable.zip extension method in linq?

the zip operator merges corresponding elements of 2 sequences using specified selector function.

var letters= new string[] { "a", "b", "c", "d", "e" }; var numbers= new int[] { 1, 2, 3 }; var q = letters.zip(numbers, (l, n) => l + n.tostring()); foreach (var s in q)     console.writeline(s); 

ouput

a1 b2 c3 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -