I have a concurrentDictionary
in which it contains a list. I would like to know how I can get the Key from the list with fewer elements.
ConcurrentDictionary<string, List<object>> _listInfo = null;
For example, imagine that the dictionary contains 4 records with the following values:
key(string) | lista(object)
1 1,2,3,4
2 1
3 1,2,3,4,5
4 1,2
The idea is to make a query about the dictionary and to return Key 2, which is the one with the fewest elements.