Created
April 11, 2012 11:42
-
-
Save tnngo2/2358827 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 Animal1 | |
{ | |
protected string Food; | |
protected string Activity; | |
} | |
class CatProtected : Animal1 | |
{ | |
static void Main(string[] args) | |
{ | |
CatProtected objCat = new CatProtected(); | |
objCat.Food = "Mouse"; | |
objCat.Activity = "Laze around"; | |
Console.WriteLine("The Cat loves to eat " + objCat.Food); | |
Console.WriteLine("The Cat loves to " + objCat.Activity); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment