Re: Restricting Inheriting Scope of a class
- From: "Nick Hounsome" <nh002@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 06 Mar 2006 08:03:36 GMT
"Rahul Arora" <rk.rahul@xxxxxxxxx> wrote in message
news:1141626870.239629.17750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I am designing some class for my DataLayer. The scenario is i have
three classess Class1,Class2,Class3. Class1 is base class for class2
and class3. It's a DLL project. What my problem is i want only class2
and class3 to be viewed as the part of the DLL and Class1 should be
hidden. Class1 is used only for deriving Class2 and Class3 in my DLL.
Once i compile the DLL and include in my application, it shows all
three classes there but i dont want class1 to appear there. Is this
possible ??? if yes..plz. suggest the way it can be implemented. I dont
want to create any other DLL for my Base class Class1. Basically i want
the scope of Class1 to be restricted to it's assembly only and Class2
and Class2 should be available to other assembilies....Please help...
You can't do it (despite what other postings might say).
You cannot have a base class less accessible than the derived class. i.e.
there is no possibility of inheritance form implementation only as in C++.
What you CAN do is make all the Class1 methods internal so that they can
only be called by your classes.
.
- References:
- Restricting Inheriting Scope of a class
- From: Rahul Arora
- Restricting Inheriting Scope of a class
- Prev by Date: Restricting Inheriting Scope of a class
- Next by Date: Re: Socket error with HTTPWeb Request/Response when copying pictures
- Previous by thread: Restricting Inheriting Scope of a class
- Index(es):
Relevant Pages
|