C#遍历一个dictionary

KeyValuePair<T,V>
如果使用的是C#3.0可以直接使用var进行遍历。
 Dictionary<string, object> ds = new Dictionary<string, object>();
foreach (KeyValuePair<string ,object> item in ds)
{
......
}
原文地址:https://www.cnblogs.com/Byrd/p/2037521.html