Question: how do ioc containers work?
Answer: IoC Container (a.k.a. DI Container) is a framework for implementing automatic dependency injection. ... The IoC container creates an object of the specified class and also injects all the dependency objects through a constructor, a property or a method at run time and disposes it at the appropriate time.