码迷,mamicode.com
首页 > Windows程序 > 详细

C# - protected internal

时间:2015-04-01 20:05:23      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:c#   protected internal   

protected internal

The type or member can be accessed by any code in the assembly in which it is declared, or from within a derived class in another assembly. Access from another assembly must take place within a class declaration that derives from the class in which the protected internal element is declared, and it must take place through an instance of the derived class type.

Note

The protected internal accessibility level means protected OR internal, not protected AND internal. In other words, a protected internal member can be accessed from any class in the same assembly, including derived classes. To limit accessibility to only derived classes in the same assembly, declare the class itself internal, and declare its members as protected.

C# - protected internal

标签:c#   protected internal   

原文地址:http://blog.csdn.net/troubleshooter/article/details/44810623

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!