【转载】#303 - accessibility of Class MembersMembers 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 memberPRivate -Only other code in the class can access the memberprotected -Code in this class or any class that inherits from this class can accessinternal -Code in files in the same assembly (.dll or .exe) can accessprotected internal -Code in the same assembly or in classes that inherit from this class can accessAccessibility 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.
原文地址:#303 - Accessibility of Class Members