Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Inheritance?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01031906
Message ID:
01031952
Vues:
13
Matthew,

You need to look at Interfaces. You can create an interface with the additional properties and methods you want to add and then have the form class inherit that interface. Class can inherit from multiple interfaces. Then, when you want to do something with a class that uses your interface, you can refer to it by the interface instead of the class.

HTH,
Chad

>I know that C# does not support inheritance. I'm wondering the best way to approach subclassing classes at different levels in the hierarchy when using a third-party framework such as Mere Mortals.
>
>For instance, MM may have this class hierarchy:
>mmBaseForm -> mmBaseBusinessForm -> mmUtilityForm
>
>Let's say I want to subclass mmBaseForm as MyBaseForm to give it my own look, error handling, etc. Then all of my custom forms will subclass MyBaseForm to get my functionality as well as the mmBaseForm functionality.
>
>Let's also say that I want to subclass mmUtilityForm as MyUtilityForm to add some functionality. mmUtilityForm already doesn't have my looks because MyBaseForm is not in its hierarchy.
>
>It would be cool to be able to get the looks and functionality in MyBaseForm as well as the functionality mmUtilityForm without having to add all of my custom code to both MyBaseForm and MyUtilityForm.
>
>Does anyone have any suggestions?
>
>Matthew J. Price
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform