Q:

c# Generics Class definition explanation

Can someone explains the following class declaration. I have been given an assignment to understand a snippet of the code and explain the parts of it. I'm unable to make sense on this class declaration. See if any of you can help.
class AnimalWorld<T> : IAnimalWorld where T : IContinentFactory, new()
{
    private IHerbivore _herbivore;
    private ICarnivore _carnivore;
    private T _factory;

    /// <summary>
    /// Contructor of Animalworld
    /// </summary>
    public AnimalWorld()
    {
        // Create new continent factory
        _factory = new T();

        // Factory creates carnivores and herbivores
        _carnivore = _factory.CreateCarnivore();
        _herbivore = _factory.CreateHerbivore();
    }

    /// <summary>
    /// Runs the foodchain, that is, carnivores are eating herbivores.
    /// </summary>
    public void RunFoodChain()
    {
        _carnivore.Eat(_herbivore);
    }
}

A:

T : IContinentFactory, new()

T must inherit from IContinentFactory
T must have parameterless constructor.

More information about new():
http://msdn.microsoft.com/en-us/library/sd2w2ew5.aspx

