The method-name "Create()" was chosen wrongly, I think.
It would be better named if it was "PrintSomething".
The question remains the same:
How come that both "New()"-methods are called and by calling "NewStation.PrintSomething()" it only calls the "PrintSomething()"-method of the derived type?
To call the PrintSomething() method inside the base type (Sector), how could I do this?
It would be better named if it was "PrintSomething".
The question remains the same:
How come that both "New()"-methods are called and by calling "NewStation.PrintSomething()" it only calls the "PrintSomething()"-method of the derived type?
To call the PrintSomething() method inside the base type (Sector), how could I do this?
Type Sector Method New() Print "Sector method was called" End method Method PrintSomething() Print "New sector has been created" End Method End type Type Station Extends Sector Method New() Print "Station method was called" End method Method PrintSomething() Print "New station has been created" End Method End type NewStation:Station = New Station NewStation.PrintSomething() ' <--- Calls only the Station's "PrintSomething" method ' How to call the Sector's PrintSomething method from here?