Hi,
Consider the following code:
public class Vehicle
{
public void StartEngine()
{
// Code here.
}
}
public class CityBus : Vehicle
{
public void MoveToLocation(Location location)
{
////base.StartEngine();
this.StartEngine();
// Do other stuff to drive the bus to the new location.
}
}
Is there any difference between this.StartEngine();
and base.StartEngine();
, except that in the second case, StartEngine
method cannot be moved to or overridden in CityBus
class? Is there a performance impact?