Access modifiers in C #:
①private, private access modifiers, members decorated by the private access modifier are accessible only within the current class and are not accessible anywhere else. The members of the class do not use modifiers, and the default is private.
②protected, which indicates that the current class can be accessed internally, and that all subclasses are accessible internally.
③internal, inside the current assembly. The default access modifier for a class is internal.
Note: The protected and internal access modifiers do not matter which one is more "accessible" because the judging criteria are different.
Protected only see if it is inside the current class or within all subclasses, regardless of whether it is in the same assembly.
The internal only depends on whether it is within an assembly, regardless of whether it has an inheritance relationship.
④protected internal, which features both protected and internal, within the current class, inside all subclasses, within the current assembly can be accessed.
⑤public, there is no limit anywhere you can access it.
All types that are directly defined in the namespace, such as classes, delegates, enumerations, structures ... The access modifier can only be public or internal.
C # access Modifiers