M
Mercede
Hi,
I've a certain problem. I've created a Class Library project that contains
the following
- A Factory Class
- A base Object
A factory can create the Base objects or objects derived from base objects.
The base object Constructor "New" is Friend and Protected. it's protected
sp that Child Classes can call it. and it's friend so that Factory Class can
Create objects of Type Base. I don't want anuone to directly create objects
of type Base or derived classes by calling New.
I've other components that are in seperate DLL(Let's say X). These
components derive from Base object. I've to add a refrence of Factory Class
Library. This goes Fine but as soon as I add a refrence of the X DLL so that
Factory can create the object of type X it fails. I start getting errors in
Factory like
Add a refrence to factory Assembly
New is not accesible
etc etc
I could do it by having classes implement an interface rather than deriving
from the base buit then there is so much code in Base that will be
duplicated. Any idea.
Mercede
I've a certain problem. I've created a Class Library project that contains
the following
- A Factory Class
- A base Object
A factory can create the Base objects or objects derived from base objects.
The base object Constructor "New" is Friend and Protected. it's protected
sp that Child Classes can call it. and it's friend so that Factory Class can
Create objects of Type Base. I don't want anuone to directly create objects
of type Base or derived classes by calling New.
I've other components that are in seperate DLL(Let's say X). These
components derive from Base object. I've to add a refrence of Factory Class
Library. This goes Fine but as soon as I add a refrence of the X DLL so that
Factory can create the object of type X it fails. I start getting errors in
Factory like
Add a refrence to factory Assembly
New is not accesible
etc etc
I could do it by having classes implement an interface rather than deriving
from the base buit then there is so much code in Base that will be
duplicated. Any idea.
Mercede