Created
April 11, 2012 11:36
-
-
Save tnngo2/2358793 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 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