.net core convert keycollection to array

C#
string[] keys = new string[dictionary.Keys.Count];
dictionary.Keys.CopyTo(keys, 0);
Source

Also in C#: