📅  最后修改于: 2022-03-11 14:48:44.994000             🧑  作者: Mango
Dictionary dicNumber = new Dictionary();
List listNumber = new List();
dicNumber.Add("1", "First");
dicNumber.Add("2", "Second");
dicNumber.Add("3", "Third");
listNumber = dicNumber.Select(kvp => kvp.Key).ToList();
// Or:
listNumber = dicNumber.Keys.ToList();