如何反映動(dòng)態(tài)對(duì)象的成員?我需要從.NET 4中使用Dynamic關(guān)鍵字聲明的對(duì)象中獲得屬性及其值的字典?似乎使用反射是行不通的。例子:dynamic s = new ExpandoObject();s.Path = "/Home";s.Name = "Home";// How do I enumerate the Path and Name properties and get their values?IDictionary<string, object> propertyValues = ???
如何反映動(dòng)態(tài)對(duì)象的成員?
尚方寶劍之說(shuō)
2019-07-09 13:18:12