Why do I need to reference a user control's base class?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!
I have made a user control called, say "MyUserCtrl", which is inherited from
another user defined class called, say "MyBaseClass". Each one of these two
are developed in its own project.

The question: When I use MyUserCtrl in a form, I must, from the form, make
reference to both classes, i.e. even to "MyBaseClass". Otherwise, it will not
work. How can I manage to skip referencing MyBaseClass? I tried to put both
user controls in one and the same project, but I got circular reference error.

Regards
M Shafaat
 
If you have 2 libraries that contain functionality you need in your
project, you cannot skip referencing both libraries.

You might want to further explore putting both controls (MyUserCtrl and
MyBaseClass) in the same project. I do not understand how that would
create a circular reference problem. The controls class should stand
alone (not depend on any of your custom projects), and then the forms
project would reference the controls project. Nothing circular there.
 
Back
Top