Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private static void CountDemo(List<Order> orders)
{
var march = new DateTime(2018, 3, 1);
var ordersOnAndAfterMarch = orders.Where(order => order.OrderDate >= march);
PrintOrders(ordersOnAndAfterMarch, indentBy: 4);
var orderCountPlacedOnAndAfterMarch = orders.Count(order => order.OrderDate >= march);
WriteLine($"Total Orders Placed On and After March: {orderCountPlacedOnAndAfterMarch}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment