What are different access modifiers/specifiers in C# ?

Different access modifiers/specifiers in C# :
  • Public - Any class or assembly can access
  • Protected - Access is limited to the containing class or classes derived from the containing class
  • Internal - Access is limited to the current assembly.
  • Protected Internal - Access is limited to the current assembly or types derived from the containing class.
  • Private - Access is limited to the containing class

No comments:

Popular Posts