Interface - Force Form Inheritance

  • Thread starter Thread starter BluDog
  • Start date Start date
B

BluDog

Hi

I have an interface and i want to impose that implementing classes
inherit from Windows.Forms.Form. As there is no IForm and an interface
cannot inherit from a non interface class, is there a sensible way of
doing this?

Cheers

blu
 
* BluDog said:
I have an interface and i want to impose that implementing classes
inherit from Windows.Forms.Form. As there is no IForm and an interface
cannot inherit from a non interface class, is there a sensible way of
doing this?

You could create a 'MustInherit' class that inherits from the windows
forms form and implements the interface.
 
You could create a 'MustInherit' class that inherits from the windows
forms form and implements the interface.

Yea, i was considering this for my 'Helper Form' but that will not
really prevent the interface from being implemented directly.

Cheers

Blu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top