foreach( KeyValuePair<string, string> kvp in myDictionary ) { Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value); }
C# KeyValuePair<TKey,TValue> 与 Dictionary<TKey,TValue> 区别
原文:https://www.cnblogs.com/Alicia-meng/p/13574845.html