|
|
|
|
|
by christophilus
2051 days ago
|
|
I spent maybe 15 years using C# and DI (for most of that time), and understand it pretty well. I still dislike it. > just they'll be hidden and tightly coupled They're more hidden with DI than without, in my experience. At any rate, having left the .NET stack around 5 years ago, I certainly don't miss DI. My current code has more and better tests than my C# code ever did, so DI didn't really help me there (nor did it hinder me-- it was neutral). But my current code is much more explicit, direct, and a fair bit more compact. I'm definitely happier with it. |
|
To me, answer is clear - class A has obvious and loosely coupled ones. Lo and behold, class A comes from program which uses DI. Class B doesn't.