Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private static void TakeDemo(List<Order> orders)
{
var firstTwoOrders1 = orders.Take(2);
PrintHeaderFooter("First Two Orders - Take", () => PrintOrders(firstTwoOrders1, indentBy), indentBy);
var firstTwoOrders2 = orders.TakeWhile((order, index) => index <= 1);
PrintHeaderFooter("First Two Orders - TakeWhile", () => PrintOrders(firstTwoOrders2, indentBy), indentBy);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.