Information générale
Catégorie:
The Mere Mortals .NET Framework
Ok, I think I am understanding things better. The problem was my lack of understanding about the inheritance chain of methods, plus I was referencing the wrong level of the bizobj for the method parameters. Let's see if I have this straight:
1) If I override a method in my application level business class, but still want the functionality of an existing override in my company level business class from which aBusinessObject is derived, I must explicitly call that parent class with base.method() from within the application level override. If the inheritance chain is longer, I would need each level to explicitly call its' parent method in order to extend functionality to the bottom of the chain, otherwise the overridden methods are not fired.
2) I am not allowed to assign an override method within the company level businessobject as "virtual", but I don't need to because once the method is declared as virtual at the top level, it remains virtual on down the chain unless I explicitly declare it otherwise.
3) If I declare a method in a child class with the same name as one in the parent class, but don't give it the same number of parameters (a different signature) as the method in the parent, then it will be treated as a different method, just like overloaded methods within the same class.
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