在C#中受保护的访问说明符和受保护的内部有什么区别

访问说明符保护和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.

相关文章

C#项目进行IIS部署过程中报错及其一般解决方案_c#iis执行语句...
微信扫码登录PC端网站应用的案例(C#)_c# 微信扫码登录
原文地址:http://msdn.microsoft.com/en-us/magazine/cc163...
前言 随着近些年微服务的流行,有越来越多的开发者和团队所采...
最近因为比较忙,好久没有写博客了,这篇主要给大家分享一下...
在多核CPU在今天和不久的将来,计算机将拥有更多的内核,Mic...