我们可以访问另一个组合中的受保护字段 [英] Can we access protected fields in another assembley

查看:117
本文介绍了我们可以访问另一个组合中的受保护字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以访问受保护的字段另一个集合,该类与基类有关系吗?另一个汇编

can we access protected fields another assembley that class having relation ship with base class another assembley

推荐答案

是的,你可以。请参阅:

http:// msdn .microsoft.com / zh-CN / library / ms173121%28v = vs.110%29.aspx [ ^ ]。



另外,你应该也明白,尽管访问修饰符引入了限制,你可以使用反射绝对访问每个类型或成员:

http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 [ ^ ],

http://msdn.microsoft.com/en-us/library/system.reflection.aspx [ ^ ]。



-SA
Yes, you can. Please see:
http://msdn.microsoft.com/en-us/library/ms173121%28v=vs.110%29.aspx[^].

In addition, you should also understand that, despite the limitations introduced by the access modifiers, you can access absolutely every type or member using reflection:
http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29[^],
http://msdn.microsoft.com/en-us/library/system.reflection.aspx[^].

—SA


请通过以下网址查看受保护领域的概念
Pleae go through below url for concept of protected field


这篇关于我们可以访问另一个组合中的受保护字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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