1.向字典中写入键和值
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("personID", "2546");
dic.Add("telephone", "448");
dic.Add("name", "shali");
2.获取键和值的几种方式
List<string> nameKey2 = new List<string>(dic.Keys);
List<string> nameKey3 = dic.Keys.ToList();
string[] nameKey4 = dic.Keys.ToArray();