Created
February 5, 2017 05:26
-
-
Save MatthewOverall/78f0152ff4ea107af2b3b4933945ac99 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public abstract class Human { | |
public abstract void GoPee(); | |
} | |
public class Male : Human { | |
public override void GoPee(){ | |
console.log("Stand Up"); | |
} | |
} | |
public class Female : Human { | |
public override void GoPee(){ | |
console.log("Sit Down"); | |
} | |
} | |
// usage | |
/* | |
foreach(var person in audience){ | |
person.GoPee(); | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment