I have a Person
class, with Name
and AreaID
properties.
public class Person
{
public string Name;
public int AreaID;
// snip
}
I have a List<Person>
with the potential for hundreds of Person objects in the list.
e.g., 100 Persons with AreaID = 1 and 100 Persons with AreaID = 2
I want to return distinct list of AreaID's and how many Persons have that AreaID.
For example, AreaID = 1 Persons = 100 AreaID = 2 Persons = 100