Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private static void IntersectDemo(List<Order> ordersOnHold, List<Order> domesticOrders, List<Order> internationalOrders)
var orderComparer = new OrderEqualityCompaprer();
var usOrdersOnHold = ordersOnHold.Intersect(domesticOrders, orderComparer);
var internationalOrdersOnHold = ordersOnHold.Intersect(internationalOrders, orderComparer);
const int indentBy = 4;
const char dividerCharacter = '*';
PrintHeaderFooter("US Orders on hold", () => PrintOrders(usOrdersOnHold, indentBy), indentBy, dividerCharacter);
PrintHeaderFooter("International Orders on hold", () => PrintOrders(internationalOrdersOnHold, indentBy), indentBy, dividerCharacter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment