Created
October 3, 2018 10:51
-
-
Save PhiHuyHoang/a659f7f606e17ed88b7776ee5373276a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Vehicle | |
{ | |
public void Go() | |
{ | |
Console.WriteLine("I'm driving"); | |
} | |
} | |
class Car : Vehicle {} | |
class Helicopter : Vehicle {} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Car car = new Car(); | |
Helicopter heli = new Helicopter(); | |
car.Go(); | |
heli.Go(); | |
Console.ReadLine(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment