Created
October 18, 2016 05:25
-
-
Save karthikeyanVK/c31e42a5092e717134d5a3af06352177 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
public class Car | |
{ | |
public virtual void Drive() | |
{ | |
Console.WriteLine("Car Drive"); | |
} | |
public virtual void ShiftGear() | |
{ | |
Console.WriteLine("shift gear"); | |
} | |
} | |
public class Toyota : Car | |
{ | |
public override void Drive() | |
{ | |
Console.WriteLine("Toyota Drive"); | |
} | |
public override void ShiftGear() | |
{ | |
Console.WriteLine("shift toyota gear"); | |
} | |
} | |
public class Audi : Car | |
{ | |
public override void Drive() | |
{ | |
Console.WriteLine("Toyota Drive"); | |
} | |
public override void ShiftGear() | |
{ | |
throw new NotImplementedException(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment