>when I create a class based on an existing class which already has code contained within it, this code is not carried over to the new class.
Yes, but you cannot see it, because the code isn't stored in that class, its stored int he parent class. You shouldn't have to modify the code from the parent class in the subclass, otherwise there would be no resaon to inherint the code.
But, in the subclass, putting code in the method overwrites any of the code you put in the parent class, and adding a DoDefault() will fire all of the parent classes code at the point where the functino is included.
Is this confusing? Some experience will straighten it out foar ya'.
Précédent
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