use*_*560 6 c# access-specifier
访问说明符protected和internal protectedC#之间有什么区别?
Las*_*olt 10
Internal 可以在集会中看到.
Protected 可以从继承自定义它的类继承的类中看到.
Protected internal 可以在程序集中看到从定义它的类派生的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.
Run Code Online (Sandbox Code Playgroud)