Specialization, Extension, and Inheritance
- slide 27 : 40
Visibility modifiers in C#
The visibility of types in assemblies and members in classes are controlled by visibility modifiers
Visibility of a type (e.g. a class) in an assembly
internal
: The type is not visible from outside the assembly
public
: The type is visible outside the assembly
Visibility of members in type (e.g., methods in classes)
private
: Accessible only in the containing type
protected
: Accessible in the containing type and in subtypes
internal
: Accessible in the assembly
protected internal:
Accessible in the assembly and in the containing type and its subtypes
public
: Accessible whenever the enclosing type is accessible
Namespaces and assemblies
Private Visibility and inheritance
Internal Visibility