Access Modifiers
Write short notes on access modifiers ?
Access modifiers provide the accessibility control for the members of classes to outside the class. They also provide the concept of data hiding. There are five member access modifiers provided by the C# Language.
By default all members of class have private accessibility. If we want a member to have any other accessibility, then we must specify a suitable access modifier to it individually.
For Example:
class Demo
{
public int a;
interna1 int x;
protected double d;
float m; // private by default
}