【发布时间】:2012-04-01 18:27:09
【问题描述】:
我的代码返回一个 PropertyInfo 的空白数组
PropertyInfo[] classProperties = typeof(Processor).GetProperties();
此类中的所有属性都是公共的。 使用 .NET 2.0 框架。
我也尝试过使用前面在我的代码中声明的实例:
PropertyInfo[] classProperties = Computer.Processor[0].GetType().GetProperties();
我已经尝试使用默认、实例和公共等绑定。
有什么想法吗?
【问题讨论】:
-
可以发一下
Processor类的代码吗?
标签: c# reflection properties