Dim car As Car = (DirectCast(d, Car)) car.OnMoving()
->
(DirectCast(d, Car)).OnMoving()
Syntax error.