Dependency Injection, is a design pattern where dependencies (instances of objects, properties) of a component are set through the constructor(s), methods or fields (properties). It is a special form of the more general dependency inversion.

Dependency injection is a design pattern where dependencies (instances of objects, properties) of a component are set through the constructor(s), methods or fields (properties).

Use the tag for:

  • The principles of dependency injection
  • When/How/Should one use dependency injection in a given, detailed situation
  • The way the injection is performed (at construction, at the call of a method, or via properties)
  • Usage of dependency injection along with other design patterns, or/and in unusual situations

More information:

Disambiguation: