"Neal" <N@NoSpam.comschrieb
Yes I agree, but surely it should not even be considered as being
ambiguous since the AMethod should never be available outside the
project in the first place since it's scope is of Friend. It appears
Protected methods simply ignore the Friend scope. If that's the case
then the VB Editor really should be removing the Friend Scope or
showing an error in Error List saying Protected Methods can only be
of Public scope.
"Protected Friend" does /not/ mean that the method is only visible to
inherited classes inside the same assembly. Instead it means that the method
is accessible from
a) all classes inside the same assembly
/as well as/
b) from inherited classes outside the assembly.
Due to b), the type "SomeClass" must be public, too.
In other words,
- "Protected" means that it is accessible from all inherited classes, even
outside the assembly.
- "Friend" means that it is accessible only inside the assembly but not only
limited to the inherited classes.
So, "Protected Friend" is not more limiting than Protected or Friend alone,
it is less limiting.
(see also F1)
Armin