In Java, protected is strictly more permissive than "package". In C# the equivalent of Java's protected is "protected internal". protected makes a member visible in derived classes, internal makes it visible in the same assembly, "protected internal" makes
it visible in both places.
MadsTorgerse...
Member
8 Points
4 Posts
Re: OO Concept--general question about Encapsulation.
Jun 14, 2007 07:01 PM|LINK
Just to elaborate:
In Java, protected is strictly more permissive than "package". In C# the equivalent of Java's protected is "protected internal". protected makes a member visible in derived classes, internal makes it visible in the same assembly, "protected internal" makes it visible in both places.
Thanks,
Mads Torgersen, MS C# Language PM