I am trying to use LINQ on my ObservableCollection to group some values in each object. To keep things simple, suppose MyObject has one property:
public List<string> UserNames;
I want to write a LINQ query that returns all the strings in UserNames for each object in the collection – then group them all by the actual name. I would like the end result to show each unique name and the count of how many times that name was found in the collection.
This is easy to do with T-Sql, but I’m not having any luck with Linq to Objects.
Thanks,
How about this?