【发布时间】:2016-06-14 20:13:56
【问题描述】:
我们正在反射一个 .net dll,它是一个 silverlight dll:
Type:System.Collections.ObjectModel.ObservableCollection`1[product.entity.Customer]
如何处理'1?
observable 集合声明如下:
ObservableCollection<product.entity.Customer> list = new ObservableCollection<product.entity.Customer>();
product.entity.Customer 只是一个 POCO。
我的问题不是关于 POCO,而是关于 '1 的反映。
如何确定何时/如何反映可观察集合持有的对象?
...
existingTypes = loadedAssembly.GetTypes();
...
flags_plus = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static;
propertyInfo = type.GetProperties(flags_plus);
...
propertyInfo.PropertyType had the '1 in it...
【问题讨论】:
标签: c# silverlight reflection observablecollection