C# Access Modifiers - Programming
In Object Oriented Programming Language (OOPS) Access Modifiers are keywords that set the accessibility of classes, methods, and other members.
This article is for beginners but even if you are an expert, this article may be useful as a quick revision.
Types of Access Modifiers in C#
C# Access Modifier defines scope for members. There are five type of access modifiers in c# :-
- Private : Accessible only with in a Class.
- Protected : Accessible with in a Class and in Derived Classes.
- Friend (internal in C#): Accessible anywhere within the current project.
- Protected friend (protected internal in C#): Accessible with current project and derived classes.
- Public : Accessible everywhere.
Conclusion: It was fun in learning and writing an article on c# access modifiers. I hope this article will be helpful for enthusiastic peoples who are eager to learn and implement some interesting stuffs in new technology.
Please feel free to comment your opinion about this article or whatever you feel like telling me. Also if you like this article, don't forget to share this article with your friends. Thanks!