Linq Distinct on list
Posted
by BahaiResearch.com
on Stack Overflow
See other posts from Stack Overflow
or by BahaiResearch.com
Published on 2010-04-30T21:34:25Z
Indexed on
2010/04/30
21:37 UTC
Read the original article
Hit count: 551
I have a list like this:
List people
age name
1 bob
1 sam
7 fred
7 tom
8 sally
I need to do a linq query on people and get an int of the number distinct ages (3)
int distinctAges = people.SomeLinq();
how? how?
© Stack Overflow or respective owner