Here's the signature of the Zip method
public static IEnumerableZip (
this IEnumerablefirst,
IEnumerablesecond,
Funcfunc);
Sample usages of Zip
string[] employee = { "Fryan", "Auric", "James" };
string[] designation = { "Manager", "Programmer", "Designer" };
var emp = employee.Zip(designation, (employee, designation) => employee + " is a " + designation + " of the company.");
foreach (var e in emp)
Console.WriteLine(e);
Results:
Fryan is a Manager of the company.
Auric is a Programmer of the company.
James is a Designer of the company.
For more LINQ tips & tricks, subscribe now.
0 comments:
Post a Comment