About 196,000 results
Open links in new tab
  1. Dependency Injection in .NET with examples? - Stack Overflow

    May 23, 2017 · Can someone explain dependency injection with a basic .NET example and provide a few links to .NET resources to extend on the subject? This is not a duplicate of What …

  2. design patterns - What is dependency injection? - Stack Overflow

    Sep 25, 2008 · It is an example of a real-life Dependency Injection (DI). Now in the technical word, dependency injection is a technique whereby one object (or static method) supplies the …

  3. c# - Implementing Configured LoggerFactory with Dependency …

    Nov 17, 2023 · I'm seeking guidance or an example demonstrating how to use the configured loggerFactory with DI, allowing me to inject the ILogger instance into multiple classes …

  4. c# - How to dynamically resolve keyed services at runtime in .NET …

    May 8, 2025 · In .NET 8, the dependency injection (DI) container introduced support for keyed services, allowing registration and resolution of services using keys. However, I'm struggling to …

  5. c# - How to use dependency injection in WinForms - Stack Overflow

    Dec 24, 2021 · 1 How to use Dependency Injection in WinForms Here is a simple explanation about how to use DI in winforms . In modern applications , DI allows us to delegate the …

  6. c# - How do you inject the HttpMessageHandler into the …

    Jul 25, 2019 · How do you inject the HttpMessageHandler into the HttpClient object using ASP.NET Core dependency injection? Asked 6 years, 5 months ago Modified 6 years, 5 …

  7. c# - .Net 8 dependency injection using reflection: service with …

    Jul 21, 2025 · I want to load all types from an assembly and register them for dependency injection, using the following reflection-heavy method: using System.Reflection; namespace …

  8. How to register ServiceBusClient for dependency injection?

    Aug 7, 2021 · I’m trying to register ServiceBusClient from the new Azure.Messaging.ServiceBus package for dependency injection as recommended in this article using ...

  9. How to use dependency injection with inheritance in C#

    Jan 1, 2018 · How to use dependency injection with inheritance in C# Asked 7 years, 11 months ago Modified 3 years, 9 months ago Viewed 24k times

  10. c# - Keyed dependency injection in ASP.NET Core - Stack Overflow

    Mar 31, 2020 · 4 Unity, Autofac and probably quite a few other Dependency injection packages all support "keyed dependency injection containers" that allow to register multiple …