Skip to content

Instantly share code, notes, and snippets.

@tnngo2
Created April 11, 2012 11:36
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 tnngo2/2358793 to your computer and use it in GitHub Desktop.
Save tnngo2/2358793 to your computer and use it in GitHub Desktop.
class Animal
{
public void Eat()
{
Console.WriteLine("Every animal eats something");
}
public void DoSomething()
{
Console.WriteLine("Every animal does something");
}
}
class Cat : Animal
{
static void Main(string[] args)
{
Cat objCat = new Cat();
objCat.Eat();
objCat.DoSomething();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment