标签:遍历 air string ons 集合 list write var lin
Dictionary<string,string> list=new Dictionary<string,string>;
foreach(var item in list) { Console.WriteLine(item.Key+item.Value); } //KeyValuePair<T,K> foreach(KeyValuePair<string,string> kv in list) { Console.WriteLine(kv.Key+kv.Value); } //通过键的集合取 foreach(string key in list.Keys) { Console.WriteLine(key+list[key]); }
标签:遍历 air string ons 集合 list write var lin
原文地址:http://www.cnblogs.com/aijing/p/7027861.html