© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•17mo ago•
41 replies
Mr. Dink

✅ Access a runtime Dictionary easier

My company is switching from
ConfigurationManager
ConfigurationManager
with transforms over to a 3rd party secrets manager. The secrets manager returns a
Dictionary<string, object>
Dictionary<string, object>
on start up. I'm needing to go through and replace all
ConfigurationManager
ConfigurationManager
calls throughout the project and I was wondering if there's an easier way to access these values rather than magic strings. My first thought is a static class where I define all the property shortcuts and keys. Then verify all keys are present on project load when we get the secrets. Am I barking up the wrong tree and there's an established way?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Using reflection to build a dictionary of methods -> attributes at runtime
C#CC# / help
3y ago
❔ Excessive runtime allocation using Dictionary with struct key TryGetValue
C#CC# / help
3y ago
❔ How can I access a member of a different class in a dictionary
C#CC# / help
4y ago
Dictionary translation
C#CC# / help
2y ago