是否有一个框架属性隐藏反射净是会员? [英] Is there a framework attribute to hide a member from reflection in .Net?

查看:126
本文介绍了是否有一个框架属性隐藏反射净是会员?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有从隐藏的成员(特别是房地产)的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.)

这篇关于是否有一个框架属性隐藏反射净是会员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆