© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
23 replies
Messiah

❔ How DI works?

Been using dependency injection to share variables between classes a lot lately, and it got me wondering how does it work? Why are they able to access eachother's variables just because they share an interface?

Using ASP.NET and more specifically HttpClient
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ ✅ AutoMapper DI
C#CC# / help
3y ago
❔ DI Question
C#CC# / help
4y ago
✅ How to get Options from DI
C#CC# / help
2y ago
DI and Views
C#CC# / help
13mo ago