By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Interface - Force Form Inheritance

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* BluDog <ne**@nospam.bludog.net> scripsit:
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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

P: n/a
>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
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.