C#------SortedLIst键值对的使用方法

方法:

SortedList sf = new SortedList();
sf.Add(0, "广州");
sf.Add(1, "江门");
sf.Add(2, "湛江");

foreach (DictionaryEntry li in sf)
{
  Console.WriteLine(li.Key);
  Console.WriteLine(li.Value);
}

 

posted @ 2017-03-29 15:42  玉天恒  阅读(955)  评论(0编辑  收藏  举报