Access specifiers or Access modifiers are keywords which are restricting access level or accessibility of a class or class members.
- Public
- Private
- Protected
- Internal
- Protected Internal
When we declare a class or class member as public, then these class or class members can be accessed by all the classes and all the project members.
Private:
When we declare a class or class member as private, which can be accessed by only current class members, which cannot be accessed by other class members.
Protected:
When ever we declare a class or class member as protected, which can be accessed by current class and derived class members.
Internal:
When we declare a class or class member as internal, which can be accessed by all the cases with in the project.
Protected Internal:
When we declare a class or class member as protected internal, which can be accessed by all the cases with in the project and derived classes from this project.
![]() |

No comments:
Post a Comment