List<string> names = new List<string>
{"amal", "asif", "munna" , "arif", "sabith" };
List<int> ages = new List<int>{ 25, 20, 15, 12, 10 };
var zipped = names.Zip(ages, (name, age) => name + " is " + age + " years old.");
foreach (var item in zipped)
{
Console.WriteLine(item);
No comments:
Post a Comment