在C#中受保护的访问说明符和受保护的内部有什么区别
发布时间:2020-12-15 18:35:46 所属栏目:百科 来源:网络整理
导读:访问说明符保护和C#内部受保护有什么区别? 解决方法 内部可以在组件中看到. 受保护的类可以从继承自定义它的类继承. 受保护的内部可以在从定义它的类派生的程序集OR类型中看到(包括来自其他程序集的类型). 见:http://msdn.microsoft.com/en-us/library/ba0
访问说明符保护和C#内部受保护有什么区别?
解决方法
内部可以在组件中看到.
受保护的类可以从继承自定义它的类继承. 受保护的内部可以在从定义它的类派生的程序集OR类型中看到(包括来自其他程序集的类型). 见:http://msdn.microsoft.com/en-us/library/ba0a1yw2.aspx 从页面复制: public Access is not restricted. protected Access is limited to the containing class or types derived from the containing class. internal Access is limited to the current assembly. protected internal Access is limited to the current assembly or types derived from the containing class. private Access is limited to the containing type. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |