Skip to content

Instantly share code, notes, and snippets.

@hatelove
Created May 11, 2013 12:54
Show Gist options
  • Save hatelove/5559891 to your computer and use it in GitHub Desktop.
Save hatelove/5559891 to your computer and use it in GitHub Desktop.
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