Skip to content

Instantly share code, notes, and snippets.

@karthikeyanVK
Created October 18, 2016 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karthikeyanVK/c31e42a5092e717134d5a3af06352177 to your computer and use it in GitHub Desktop.
Save karthikeyanVK/c31e42a5092e717134d5a3af06352177 to your computer and use it in GitHub Desktop.
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