日期:2014-05-17 浏览次数:20973 次
Test t = new Test();
var list = t.GetType().GetProperty("dictionary").GetValue(t, null);
foreach (object o in (list as IEnumerable))
{
var itemKey = o.GetType().GetProperty("Key").GetValue(o, null);
Console.WriteLine(itemKey);
var itemValue = o.GetType().GetProperty("Value").GetValue(o, null);
foreach (object subItem in (itemValue as IEnumerable))
Console.WriteLine(subItem);
}