© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
5 replies
Elio

✅ Singleton Class

Do you know if there is a way to call a method each time i retrieve my singleton class this way :
services.GetRequiredService<MaterialDetailsViewModel>()
services.GetRequiredService<MaterialDetailsViewModel>()

I want to reset 1 variable each time i call this singleton with
GetRequiredService
GetRequiredService
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

❔ Singleton Pattern
C#CC# / help
4y ago
Enum based Singleton
C#CC# / help
2y ago
❔ Singleton Pattern StackOverflowException
C#CC# / help
4y ago
SignalR ConnectionManager Singleton
C#CC# / help
4y ago