I have a List>. How can I count all the elements in this as if it was a single List in the fastest way?
List>
List
So far I h
To count all the elements in all the lists in the list, you could use the aggregating operators:
int count = listOfLists.Sum(l => l.Distinct().Count());