Wouldn't increasing access technically just be adding a member to the
subclass?  A member that, publicly anyway, the superclass didn't have.

What happens internally is pretty irrelevant.

In my book, decreasing is always bad.  I've seen it happen in some
Microsoft classes.  It was really annoying.  I can't imagine when this
would be a good idea.


David

"If we can hit that bullseye, the rest of the dominoes
 will fall like a house of cards... checkmate!"
 -Zapp Brannigan, Futurama


On Wed, Aug 4, 2010 at 12:22, Arjang Assadi <[email protected]> wrote:
> Are there any rules/guide lines / rules of thumb regarding modifying
> members access modifiers through inheritance?
>
> I can only think of LSP that one should not reduce access level of
> members in a child class respect to it's parent.
>
> What about increasing the access level? e.g. having a protected member
> turned public in the child class? somehow seems wrong, but I can not
> point at the why.
>
> Regards
>
> Arjang
>

Reply via email to