首页 > 数据库技术 > 详细

【转载】Accessibility of Class Members

时间:2014-03-11 22:57:15      阅读:619      评论:0      收藏:0      [点我收藏+]

Members of a class can have different kinds of accessibility. An accessibility keyword indicates what source code can access the member.  The different types of accessibility are:

  • public - All code can access the member
  • private - Only other code in the class can access the member
  • protected - Code in this class or any class that inherits from this class can access
  • internal - Code in files in the same assembly (.dll or .exe) can access
  • protected internal - Code in the same assembly or in classes that inherit from this class can access

Accessibility keywords can apply to the following kinds of members of a class: fields, properties, methods, constants, indexers, events, constructors and nested types.  They can apply to both instance and static members.

【转载】Accessibility of Class Members,布布扣,bubuko.com

【转载】Accessibility of Class Members

原文:http://www.cnblogs.com/yuthreestone/p/3593226.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!