Read the details here - http://www.codeproject.com/Articles/1075189/Lets-write-a-Tiny-IoC-Container-to-learn-and-for-f or http://rahulrajatsingh.com/2016/01/want-to-understand-ioc-containers-lets-write-a-tiny-one-to-learnand-for-fun/