Daniel Pitts wrote:
However, if you make everything public, you can keep
Inner protected.
[...]
Inner's members are protected from anyone who doesn't inherit from
Inner.
Not fully protected (see my previous post).
The only inconsistency here is that outer classes can reference
inner classes members, regardless of access modifier. Inner itself
isn't inherited into SecondLevel, only the namespace of the definition
is.
Hmm... I don't get it -- there is no any inconsistency IMHO.
AIUI, the Inner class is a member of TopLevel class, and as a member
(not a ?namespace?) is inherited by/into the SecondLevel class.
The access modifiers of Inner's members are honored the same way as for
any other language element, regardless of the SecondLevel class access
level to the Inner class.
That's how I see that. Am I missing something?
interpretive and reflective capabilities. I was reading the first part of the
relevant.
but" territory.