Dictionary<int, string> dic = new Dictionary<int, string>();
dic.Add(1, "睛睛青");
dic[2] = "sb";
foreach (KeyValuePair<int, string> kup in dic)
{
Console.WriteLine("键{0}******值{1}", kup.Key, kup.Value);
}
Console.ReadKey();
时间: 2024-10-08 22:17:37