C#C
C#11mo ago
Faker

✅ meaning on dependency injection in C#

Hello guys, I was just reading a bit, I came across those terms "dependency injection". Can someone explain what this mean please. I read a bit about it, what I read is that dependency injection is used to prevent "tight coupling" (don't know what this is). Is dependency injection same as when we are importing libraries, like .NET libraries?

Would really appreciate if someone can give simple code example of with and without dependency injection of what happen
Was this page helpful?