Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created March 11, 2018 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dance2die/346e92a6beaf551c8120652d6351d3e7 to your computer and use it in GitHub Desktop.
Save dance2die/346e92a6beaf551c8120652d6351d3e7 to your computer and use it in GitHub Desktop.
private static void ZipDemo(List<Order> orders)
{
var orderNumbersInText = new[] { "One", "Two", "Three", "Four", "Five" };
orders
.Zip(orderNumbersInText, (order, text) => $"Quantity of Order {text}: {order.Quantity}")
.ToList()
.ForEach(sentence => WriteLine(sentence));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment