Jump to content

VS.NET C# and Abstract Classes


Guest Brody

Recommended Posts

Guest Brody
I'm in the middle of writing a Smartphone application in VS.NET using

C# that uses multiple forms. Seeing as each form's navigation menu is

pretty much the same i made the obvious decision to reduce code

duplication by including an abstract class. Now this class is the

parent obviously and each form is a child of it. My problem lies here

as each form automatically inherits from System.Windows.Forms.Form and

multiple inheritnece is naturally not allowed so how do i inherit from

the Forms class and my own? I have tried making my own class inherit

from the Forms class and then having each actual form inherit from my

class thus inheriting the Forms class in a roundabout way but the form

designer throws up a bug if a form does not directly inherit from the

System.Windows.Forms.Form class so i'm stuck! There must be an obvious

way around this but i'm not able to see it at the moment!

Can anyone help me?

Link to comment
Share on other sites

  • 1 month later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.