Created
February 28, 2013 08:57
-
-
Save einarwh/5055316 to your computer and use it in GitHub Desktop.
ICanine and friends.
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
interface ICanine | |
{ | |
string Bark { get; } | |
} | |
class Wolf : ICanine | |
{ | |
public virtual string Bark { get { return "Aooo!"; } } | |
} | |
class Dog : ICanine | |
{ | |
public virtual string Bark { get { return "Woof!"; } } | |
} | |
class Chihuahua : Dog | |
{ | |
public override string Bark { get { return "Arff!"; } } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment