Information Technology Reference
In-Depth Information
Summary of Member Access Modifiers
The following two tables summarize the characteristics of the five member access levels.
Table 7-1 lists the modifiers and gives an intuitive summary of the effects of the modifier.
Table 7-1. Member Access Modifiers
Modifier
Meaning
private
Accessible only within the class
internal
Accessible to all classes within this assembly
protected
Accessible to all classes derived from this class
protected internal
Accessible to all classes that are either derived from this class or are
declared within this assembly
public
Accessible to any class
Table 7-2 lists the access modifiers down the left side of the table, and the categories of
classes across the top. Derived refers to classes derived from the class declaring the member.
Non-derived means classes not derived from the class declaring the member. A check in a cell
means that that category of class can access members with the corresponding modifier.
Table 7-2. Summary of Member Accessibility
Classes in Same Assembly
Classes in Different Assembly
Non-derived
Derived
Non-derived
Derived
private
internal
protected
protected internal
public
Search WWH ::




Custom Search