I want to restrict the access of protected methods to only some inherited classes.
For example, there is a base class, for example
TBase = Class
Protected
Method1;
Method2;
Method3;
Method4;
End;
I have two classes derived from TBase
TDerived1 = Class(TBase)
//Here i must access only Method1,Method2 and Method3
End;
TDerived2 = Class(TBase)
//Here i must access only Method3 and Method4
End;
Then is it possible to access only Method1, Method2 and Method3 when I use TDerived1 objects and
Method3 and Method4 when I use TDerived2 objects
source
share