10 c# reflection typedescriptor
最近我一直在使用反射在我的项目中工作,我有当前的问题.
在in中Type.GetProperties(Flags)
,我们可以使用'Flags'过滤我们获得的属性; 在TypeDescriptor.GetProperties()
,我们没有.
在type.GetProperties
我可以过滤得到的只有性能不继承.是否可以使用TypeDescriptor.GetProperties()
(仅限属性未继承)?
谢谢
不,你不能.
该TypeDescriptor.GetProperties()
用于获取PropertyDescriptor
与可能性情况下使用特定的过滤Attribute
秒.
该Type.GetProperties()
用于获取PropertyInfo
与可能性情况下使用特定的过滤BindingFlags
.
归档时间: |
|
查看次数: |
1155 次 |
最近记录: |