using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SortedList<string, int> list = new SortedList<string, int>();
list.Add("d", 4);
list.Add("c", 3);
list.Add("a", 1);
list.Add("b", 2);
foreach (KeyValuePair<string, int> item in list)
{
Console.WriteLine(item.Key + "," + item.Value.ToString());
}
Console.ReadKey();
}
}
}输出如下:
a,1
b,2
c,3
d,4
评论(0)
暂无评论。