受保护的类可以从继承自定义它的类继承.
受保护的内部可以在从定义它的类派生的程序集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.总结
以上是内存溢出为你收集整理的在C#中受保护的访问说明符和受保护的内部有什么区别全部内容,希望文章能够帮你解决在C#中受保护的访问说明符和受保护的内部有什么区别所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)