crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

What is Dependency Injection in c#
Question Posted on 03 May 2020Home >> DotNet >> C# >> What is Dependency Injection in c#

What is Dependency Injection in c#
First of all we learn what is Dependency Injection. Its a design pattern which helps us to create a loosely coupled software components. Or we can say that its help us to reduce the tight coupling between the software components. Which helps us to reduce the complexity of our applications.
Now before going in details we will learn something about Tight Coupling. Tight Coupling means classes and objects are dependent on each other. To understand this we will take another logic when one class is dependent on another concrete class
then it is said that tight couple in between these 2 classes. If we want to change dependent object then we also need to change the classes where dependent object is used. For small application it is easy to do that but for large application it is very difficult to handle these changes.
Now comes to Loose Coupling. When two objects are independent of each other means if one object is changed will not effect another object then this is said loose coupling. With the help of loose coupling changes in future can easily adopted and done and also helps manage to handle the complexity of the application.
DI (Dependency Injection) design pattern in c# is a Process in which we were injecting the object of class into a class that depends on that object. Dependency Injection design pattern is the mostly used design pattern nowadays to remove the dependencies between the objects.
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Simplest definition of partial classes and its rules?

Definition of Tuple class with some examples?

Define Race Condition in cSharp?

C#.Net Reserve Words

can we inherit private class level variables in c#






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap