问题
Hey, how could I do this as short as possible?
Thanks :-)
回答1:
Try this:
System.Collections.Hashtable ht = new System.Collections.Hashtable();
List<string> list = ht.Keys.Cast<string>().ToList();
来源:https://stackoverflow.com/questions/3297558/create-a-liststring-from-hashtable-keys