Public: Public, public
Private: Private, only inCurrent ClassThe internal access
protected: Protected, only inthe inner of the current classAnd this class ofsub-classAccess in the.
Internal: Only inCurrent ProjectAccess in the. In the same project, the permissions for internal and public are the same.
Internal
protected:Internal+protected (protected under current project)1), there are only two access modifiers that can modify a class: public, Internal. 2), the subclass's access rights cannot be higher than the parent class's access rights, it will burst the members of the parent class. Type before, access modifier: public internal (default)--modifiers for polymorphism: abstract (abstraction class, cannot be instantiated) sealed (Sealed, not allowed to be inherited) static (static, in contrast to polymorphism)--access modifier public internal private (default ) protectedInternalprotected --polymorphism modifiers for virtual abstract override sealed static
Access modifiers in C #