C# – Convert a dictionary to a list
The simplest way to convert a dictionary to a list is by using the Linq ToList() method, like this: When used on a dictionary, ToList() returns a list of KeyValuePair objects. This example outputs the following: Dictionary keys to list If you want a list of the dictionary’s keys, use ToList() on Dictionary.Keys, like this: … Read more