I can write code like:var dependency = Hello!var something = new Something(dependency);something.DoStuffWithDependency();Or I could write it like:var dependency = Hello!var something = new Something();something.DoStuff(dependency);Where the first example takes the dependency in the constructor and uses it in some method.Because it's a dependency, does it belong in the constructor? Or should it be injected into the method?
Does dependency injection belong in constructors, setters or other methods?
design;dependency injection