C # access modifier of basic knowledge 8,
1. Class access modifier
| Modifier |
Access permission |
| None or internal |
The callback class can only be used in the same assembly. |
| Public |
The same Assembly or any external component that references this assembly can be used as a category. |
| Abstract or internal abstract |
The class can only be inherited from the same assembly. The class cannot be instantiated. |
| Public abstract |
Any other assembly in the same assembly or referenced in the Assembly can be called classes, which cannot be instantiated and can only be inherited. |
| Sealed or internal sealed |
The class can only be in the same Assembly. This class cannot be inherited and can only be instantiated. |
| Public sealed |
The same assembly or other assembly that references the Assembly can be accessed, cannot be inherited, and can only be instantiated |
2. Member Modifier
| Modifier |
Access permission |
| Public |
Access to the same assembly or other assembly that references the Assembly |
| Private |
Accessible in the same class |
| Protected |
Only access from the same class or from a derived class |
| Internal |
Only one set of programs can access |
| Protect internal |
You can access |