Skip to content

Instantly share code, notes, and snippets.

@karthikeyanVK
Created October 18, 2016 05:26
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/06de40495748379dc93eef362fe592fa to your computer and use it in GitHub Desktop.
Save karthikeyanVK/06de40495748379dc93eef362fe592fa to your computer and use it in GitHub Desktop.
public class Toyota : Car
{
public string type { get; set; }
public override void Drive()
{
Console.WriteLine("Toyota Drive");
}
public override void ShiftGear()
{
if(type == "ETIO")
{
Console.WriteLine("shift etio type-toyota gear");
return;
}
Console.WriteLine("shift toyota gear");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment