I got some set of base classes within one namespace and few sets of derived classes in other namespaces. Everything in one project. Something like:
Namespace Base
Public Class BaseElement
Protected Friend Readonly Property SubElements() as BaseElements
End Class
End Namespace
...
Namespace Books
Public Class Book
Inherits Base.BaseElement
Public Readonly Property Pages() as Pages
return MyBase.SubElements
End Property
End Class
End Namespace
I have multiple derived classes and want them to have some easily understandable properties visible instead of .SubElements.
OK, it can be done declaring .SubElements as Protected in BaseElement class. But in this case I cannot access this property from other classes in Base namespace that are not derived from it.
I tried adding Friend keyword, but it made this property visible when I'm instantiating derived classes too.
So... any way to hide some properties when using derived classes while being able to use them using base class?