Created
April 14, 2018 21:07
-
-
Save dance2die/a3c27c88d4bc36e07496ab1c69701dfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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