Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created March 11, 2018 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dance2die/4c00edfc21e4e6d1122fb37ae90eb26b to your computer and use it in GitHub Desktop.
Save dance2die/4c00edfc21e4e6d1122fb37ae90eb26b to your computer and use it in GitHub Desktop.
private static void MinMaxDemo(List<Order> orders)
{
var minimumQuantity = orders.Min(order => order.Quantity);
var maximumQuantity = orders.Max(order => order.Quantity);
WriteLine($"Minimum Quantity: {minimumQuantity}");
WriteLine($"Maximum Quantity: {maximumQuantity}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment