Object-oriented programming (OOPs) Question:
What is Private access modifier in C#?
Answer:
The private keyword is a member access modifier ie. we can't explicitly declare a class as Private, however if do not specify any access modifier to the class, its scope will be assumed as Private. Private access is the least permissive access level of all access modifiers.
Private members are accessible only within the body of the class or the struct in which they are declared. This is the default access modifier for the class declaration.
Private members are accessible only within the body of the class or the struct in which they are declared. This is the default access modifier for the class declaration.
Previous Question | Next Question |
What is Internal access modifier in C#? | What is Public access modifier in C#? |