C # - I know I can do this in LINQ, but I cannot get it to work
I got a list of RegionGroup objects with two properties: int "number" and a list <> of the Regions.
I need to output the distribution of the number of Regions merged for each number. For example given:
[Region 1] - num: 1 - list <> has 5 members
[Region 2] - num: 3 - list <> has 2 members
[Region 3] - num: 4 - list <> has 9 members
[Region 4] - number: 1 - list <> has 5 members
[Region 5] - num: 3 - list <> has 4 members
I need to get something like:
number: 1 - total 10 participants
number: 3 - total 6 members
number: 4 - total 9 members
I've been doing various tutorials and it seems to me that I need to use groups, but I couldn't get anything to work.
Any help? Thank!
0
source to share
2 answers
+1
source to share