Generic parent Collection split to child collections

.net-3.5, c#, ienumerable, list

Solution

LINQ makes this simple:

var cats = animals.OfType<Cat>().ToList();
var dogs = animals.OfType<Dog>().ToList();
var cows = animals.OfType<Cow>().ToList();

Problem

I have a list of `IAnimal` ``` List<IAnimal> Animals ``` Inside this list I have 3 different `Animal` - `Cat` 5 objects - `Dog` 10 objects - `Cow` 3 objects How can I generate 3 different lists of the sub `Animal` type? Result should be - `List<Cat> Cats` contains 5 objects - `List<Dog> Dogs` contains 10 objects - `List<Cow> Cows` contains 3 objects I don't mind of using different collection type then `List`. `IEnumerable` or any others?

Original source