是否有一个框架属性隐藏反射净是会员?反射、有一个、框架、属性

2023-09-05 02:53:34 作者:他的唇 我吻过

有没有从隐藏的成员(特别是房地产)的typeof(MyType的).GetProperties()在.net中的属性?

Is there an attribute that hides a member (specifically a property) from typeof(MyType).GetProperties() in .net?

我在寻找一个快速解决 - 即不创建自定义属性等。

I'm looking for a quick fix - i.e. not creating custom attributes etc..

感谢

推荐答案

没有。

反思使人们看到的一切,包括成员标记为私有。

Reflection allows one to see everything, including members marked private.

(在端反射使用该CLR中,包括了JIT,使用相同的元数据。)

(In the end reflection uses the same metadata that the CLR, including the JIT, uses.)