Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created February 24, 2018 22:39
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/8da7e590187ff210510519b1f1f937d2 to your computer and use it in GitHub Desktop.
Save dance2die/8da7e590187ff210510519b1f1f937d2 to your computer and use it in GitHub Desktop.
LINQ - Select
private static void SelectDemo(List<Order> orders)
{
var quantities = orders.Select(order => order.Quantity);
quantities.ToList().ForEach(quantity => System.Console.WriteLine($"Quantity: {quantity}"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment