Skip to content

Instantly share code, notes, and snippets.

@curtisault
Last active August 6, 2018 18:15
Show Gist options
  • Save curtisault/22f7d7e4d3f924912078b5f358e8c696 to your computer and use it in GitHub Desktop.
Save curtisault/22f7d7e4d3f924912078b5f358e8c696 to your computer and use it in GitHub Desktop.
LINQ Things
// for the sake of simplicity:
// all List objects are "items"
// all object references are "object"
// All distinct items in a list
items.GroupBy(x => new {x.fields, x.to, x.group, x.by}).Select(s => s.First()).ToList()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment