---
title: "Discussion on \"Handling Dependency Injection in Inherited Classes\" | Hashnode"
description: "Discussion on \"Handling Dependency Injection in Inherited Classes\". Dependency injection (DI) is a wonderful thing. Simply add your dependency as a parameter to the constructor (most commonly) of your class, register it with you DI container, and away you go - the DI container will manage the rest. Some of the key be..."
url: "https://hashnode.com/posts/handling-dependency-injection-in-inherited-classes/6072a6838b2b857c0bdb69ab"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Handling Dependency Injection in Inherited Classes](https://samwalpole.com/handling-dependency-injection-in-inherited-classes?utm_source=hashnode&utm_medium=feed)

Dependency injection (DI) is a wonderful thing. Simply add your dependency as a parameter to the constructor (most commonly) of your class, register it with you DI container, and away you go - the DI container will manage the rest. Some of the key be...

Apr 11, 2021 · 4 min read · samwalpole.com  
Updated Aug 25, 2024  
Read the article

-   [#csharp](https://hashnode.com/tag/csharp)
-   [#dotnet](https://hashnode.com/tag/dotnet)
-   [#dotnetcore](https://hashnode.com/tag/dotnetcore)
-   [#dependency-injection](https://hashnode.com/tag/dependency-injection)
-   [#inheritance](https://hashnode.com/tag/inheritance)

## Written by

[Sam Walpole](https://hashnode.com/@dr_sam_walpole)

@dr\_sam\_walpole · United Kingdom

  
[View profile](https://hashnode.com/@dr_sam_walpole)

👨‍💻 Fullstack .NET and JavaScript teacher and advocate 👨‍💻

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
