Just For Me

博客园 首页 新随笔 联系 订阅 管理

2010年9月21日 #

摘要: 今天拿出一点时间,对这几个C#访问修饰符重新理解了一下:类和成员均有访问修饰符。类只能用public, Internal来修饰,默认值:public成员能用以下5种来修饰,默认值:PrivatePrivate: 类自身调用Protected: 以包含Protected 的类开始,延伸到所有派生类,均可访问Public:不用多说, 所有的类均可访问Internal: 同一个程序集中的所有类均可访问,可以想象成Public 的其中一个程序集集合。Internal Protected: Internal 和 Protected的并集, 同一个程序集中的所有类,以及所有程序集中的子类。 阅读全文
posted @ 2010-09-21 17:15 JunjieChang 阅读(2210) 评论(0) 推荐(0) 编辑