Class:
Class access modifiers include public and Internal. The default value is internal.
Internal restriction class access in this project and cannot be accessed by other projects
Public allows the class to be accessed in other projects, but you must first Add a reference to the project where the class is located and use the namespace of the class;
Method:
Method access modifiers include private, protected, internal, public, and protected internal. The default value is private.
The private method is restricted to access in this class and cannot be accessed in other classes and projects of this project.
Protected restricts the access of methods in this class and its sub-classes, including the sub-classes of external projects (direct call, without instantiation); Non-inheritance class in this project and other projects, and access through instance calls
Internal restricts access to all classes in the project and cannot be accessed by other projects.
Public allows the method to be accessed in other projects, but you must first Add a reference to the project where the method is located, and the namespace of the using class;
** Protected internal allows the method to be accessed in all classes of the project that have an inheritance relationship with the external project. Actually, the union of the two ranges is used. Note that this is not an intersection.