Convert Dictionary.keyscollection to array of strings

Viewed 74849

I have a Dictionary<string, List<Order>> and I want to have the list of keys in an array. But when I choose

string[] keys = dictionary.Keys;

This doesn't compile.

How do I convert KeysCollection to an array of Strings?

5 Answers
Related