1. Default access modifiers for elements under namespaces
Public: Any other code of the same assembly or other assemblies that reference the assembly can access the type or member.
Internal: Any code in the same assembly can access the type or member, but other assemblies cannot be accessed.
2. Default access modifiers for members in each type
The remaining modifiers are primarily positive to inherit the language attribute, with inherited types having two classes (class) and Interfaces (interface). Public,internal can also be used for type members.
Private: Code of the same class and struct can access the type and members.
Protected: Code in the same class and derived (inherited attribute) classes can access the type and members.
Protected internal: Any code in the same assembly or any derived class in another assembly can access the type or member.
MSDN Tips:
1.) The accessibility of a derived class cannot be greater than its base type. In other words, there cannot be a public class B derived from the inner Class A. If this is allowed, a becomes a public class, because all protected members of a and internal members can be accessed from derived classes.
2.) The accessibility of a member must not be greater than the accessibility of its containing type.
3.) You can declare class members (including nested classes and structs) using either of the five access types.
Interface (interface)
The interface member access adornment defaults is considered public and cannot be displayed using the access modifier.
Classes (Class)
The constructor defaults to the public access modifier.
Destructors cannot be displayed using the access adornment Fu Gingme to consider the private access modifier.
The default access modifier for a member of a class is private;
Enum (enum)
Enumeration type members default to the public access modifier and cannot be displayed using modifiers.
Structure (struct)
The struct member defaults to the private modifier.
Struct members cannot be declared as protected members, because structs do not support inheritance.
Nested types
The default access modifier for a nested type is private. And class, the members of the struct have the same type of default access
Default access modifiers in C #