I have few classes(Dog, Cat, Cow...) which implement interface IAnimal. They are putted in World.Animals library. And in another class library let's say World.Earth i want to create instance for each IAnimal. I figured out that GetExecutingAssembly won't work. So what should have looked my code
var types = Assembly. // what's next? GetReferencedAssembly?
foreach(var type in types)
{
var animal = (IAnimal)Activator.CreateInstance(typeof(type));
}