Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private static void AverageDemo(List<Order> orders)
{
var averageQuantity = orders.Average(order => order.Quantity);
var totalQuantities = orders.Sum(order => order.Quantity);
var count = orders.Count();
WriteLine($"Average Quantity: {totalQuantities} / {count} = {averageQuantity}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.