R
Rlrcstr
Is there any way to restrain member visibility to within a class? I have a class with a few classes defined within. (Note that they aren't inheriting from the class, just encapsulated within it.) I want the inner classes to be able to share data with the outer class, but not outside of it. Protected only seems to affect derived classes. And Friend allows the stuff to be seen anywhere in the application.
I'm probably asking too much, but I want the inner class to be seen publicly, but save a few of it's members only for access by the outer class:
Public Class OuterClass
Private _somePrivateVar <- Only from within OuterClass
Public _somePublicVar <- Can be seen by everyone.
Public Class InnerClass
Public _somePublicVar <- Can be seen by everyone.
<?????> _someOtherVar <- Can be seen by OuterClass, by not beyond.
End Class
End Class
Is this possible?
Thanks.
Jerry
I'm probably asking too much, but I want the inner class to be seen publicly, but save a few of it's members only for access by the outer class:
Public Class OuterClass
Private _somePrivateVar <- Only from within OuterClass
Public _somePublicVar <- Can be seen by everyone.
Public Class InnerClass
Public _somePublicVar <- Can be seen by everyone.
<?????> _someOtherVar <- Can be seen by OuterClass, by not beyond.
End Class
End Class
Is this possible?
Thanks.
Jerry