How to get values in a dictionary as a list in C#

If you have a dictionary with scalar entities, its is fairly straightforward to get either all the Keys or the Values as a list: Let’s say we have: Dictionary<string, string> MyDictionary To get all the keys as a list: MyDictionary.Keys.ToList() To get all the values as a list: MyDictionary.Values.ToList() If you have a case where […]