.NET interview

What is dependency injection, and what are its benefits?
Dependency injection is a design pattern used for developing loosely coupled code. It takes away the responsibility of creating dependencies from a class. It implies sending a dependency into a dependent object as opposed to the dependent object controlling life cycle of its dependencies. Some of its benefits are as follows: Increases code reusability Increases code maintainability Improves application testing Reduces class coupling
{"name":".NET interview", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is dependency injection, and what are its benefits?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Make your own Survey
- it's free to start.