C# 输出Dictionary中所有的 键 和 值

//以下是输出Dictionary中所有的值。只要循环所有的key就行了

foreach (string key in dic_userinfo.Keys)
{
   Console.WriteLine(string.Format("key: {0} value{1}", key, dic_userinfo[key]));
}

  

原文地址:https://www.cnblogs.com/liuzheng0612/p/12841637.html