Created
May 11, 2013 12:54
-
-
Save hatelove/5559891 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 AbstractBoxOfFruit<TFruit> where TFruit : Fruit | |
{ | |
public abstract void Add(TFruit fruit); | |
} | |
public class BoxOfApple : AbstractBoxOfFruit<Apple> | |
{ | |
public override void Add(Apple fruit) | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
public class Fruit | |
{ | |
} | |
public class Apple : Fruit | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment