List KeyValuePair

    xiaoxiao2022-07-03  129

    List<KeyValuePair<string,string>> list = new List<KeyValuePair<string, string>>();

    list.Add(new KeyValuePair<string, string>("asdf1", "1"));

    list.Add(new KeyValuePair<string, string>("asdf1", "1"));

    list.Add(new KeyValuePair<string, string>("asdf1", "1"));

    Dictionary<string, string> dictionary = list.ToDictionary(x => x.Key, x => x.Value);

    list = dictionary.ToList();

    最新回复(0)