I want to get the distinct values in a list, but not by the standard equality comparison.
What I want to do is something like this:
return myList.Dis
But that seems messy.
It's not messy, it's correct.
Distinct Programmers by FirstName and there are four Amy's, which one do you want?Group programmers By FirstName and take the First one, then it is clear what you want to do in the case of four Amy's.I can only use it here because I have a single key.
You can do a multiple key "distinct" with the same pattern:
return myList
.GroupBy( x => new { x.Url, x.Age } )
.Select( g => g.First() );