How a class dependent to another class? Any example so that clearly explain in interview.
Now what is Dependency injection? they reduces tightly coupled to loosley coupled so, code maintaince is easy so how any example?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Jul 31, 2016, 9:39 PM EDT
There are three types of dependency injections:
- Constructor Dependency Injection
- Setter Dependency Injection
- Interface Dependency Injection
There are some articles which explained dependencyinjection and Inversion of control. Please have a look on below.1.http://www.c-sharpcorner.com/UploadFile/3d39b4/constructor-dependency-injection-pattern-implementation-in-c/
2. http://www.c-sharpcorner.com/UploadFile/3d39b4/crud-operations-using-the-generic-repository-pattern-and-dep/
3.http://www.c-sharpcorner.com/article/dependency-inject-using-ninject-ioc-in-console-application/
Manas MohapatraRank #182 · 13.2K reputationPosted Jul 31, 2016, 9:59 PM EDT
Ashish Verma197 reputationPosted Jul 31, 2016, 10:05 PM EDT
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Jul 31, 2016, 10:23 PM EDT
Vinay SinghRank #604 · 4K reputationPosted Aug 1, 2016, 1:31 AM EDT