Author : MD TAREQ HASSAN | Updated : 2021/03/22

What is Access Modifier?

Access Modifier in CSharp

Declared accessibility Meaning
public Access is not restricted
private Access is limited to the containing type
protected containing class and derived class
internal assembly level
protected internal derived class and assembly level
default access modifier
(when no access modifier is mentioned)
fields + structure: private
methods + enum : public
for class : internal (assembly level)