Why doesn't new WSA Reflection API contain methods to get members with particular bindings?

偶尔善良 提交于 2019-12-10 22:03:45

问题


Consider properties for example.

In old API I could call Type.GetProperties(BindingFlgas.Static | BindingFlags.Public);

But with TypeInfo I have either DeclaredProperties or GetRuntimeProperties() which return PropertyInfo instances.

But PropertyInfo does not contain IsStatic, IsPublic properties. To know this I first need to get Get or Set-method and check its properties.

It is said that new reflection API is more sound in architecture and performance ways.
But It's hard to believe in it. With example given above should I care about performance? May be I am missing something important in new approach?

来源:https://stackoverflow.com/questions/18474112/why-doesnt-new-wsa-reflection-api-contain-methods-to-get-members-with-particula

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!