Information générale
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Network:
Windows 2003 Server
I know what you mean - sometimes I wish I could use code from two different classes too. There always seems to be some way around it.
"Multiple inheritance" is allowed in C#, but you can only inherit one class. I realize you know this, just wanted to be specific. You can inherit from multiple interfaces. I'm sure you know this too <s>, and Bonnie mentioned that.
The problem, I think, is that you don't want to implement an interface, you want to use existing code. You can't define code in an interface, just the declaration for its members, so an interface might not be your solution. Then again, it might.
What does your BasePath property do? I'm assuming it's more than a getter/setter. Guess what I'm thinking is it might be possible to create a static class/method that takes the form as a parameter and returns something useful.
Mike
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement