Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private static void SkipDemo(List<Order> orders)
var lastTwoOrders1 = orders.Skip(orders.Count - 2);
PrintHeaderFooter("Last Two Orders - Skip", () => PrintOrders(lastTwoOrders1, indentBy), indentBy);
var lastTwoOrders2 = orders.SkipWhile((order, index) => index < orders.Count - 2);
PrintHeaderFooter("Last Two Orders - SkipWhile", () => PrintOrders(lastTwoOrders2, 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.