interface ITest { void HelloWord(); } public class Test1: ITest { public void HelloWord() { Console.WriteLine("Test1 HellWorld"); } }public class Test2 : ITest { public void HelloWord() { Console.WriteLine("Test2 HellWorld"); } } static void Main(string[] args) { var container = new ContainerBuilder(); container.RegisterType().AsImplementedInterfaces(); var build = container.Build(); ITest resolve = build.Resolve (); resolve.HelloWord(); Console.ReadKey(); }