What is the difference between access specifier protected
and internal protected
in C# ?
Internal
can be seen within the assembly.
Protected
can be seen by classes inheriting from the class where it is defined.
Protected internal
can be seen within the assembly OR types derived from the class where it is defined (including types from other assemblies).
See: http://msdn.microsoft.com/en-us/library/ba0a1yw2.aspx
Copied from the page:
public Access is not restricted.
protected Access is limited to the containing class or types 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 type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With