Created
April 14, 2018 21:09
-
-
Save dance2die/6c2ce82f63d7772a675dc0a3e073f136 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 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