I like this very much here is the one sample example of Zip extension.
int[] numberArray = { 0, 1, 2, 3, 4 };
string[] nameArray = { "zero", "one" };
var combinedArray = numberArray.Zip(nameArray, (number, name) => number.ToString() + "(" + name + ")").ToArray();
Array.ForEach(combinedArray, s => Console.WriteLine(s));
0 comments:
Post a Comment