Suspect my brain isn’t working today – I need to extract a list of keys, etc:
Dictionary<string, MyClass> myDict;
List<String> myKeys = myDict.Keys;
The second line fails to compile as the Keys property returns a “KeyCollection” class and not a list<> of key objects.
Using LINQ you can do the following…
However depending on what your goal is with the keys (selective enumeration etc) it might make more sense to work with the key collection and not convert to a list.