✅ Dynamic settings .net core

As title says, I need to somehow achieve dynamic settings, where I can through script create a new setting in Properties.Settings.Default, under name, be able to access int that it's going to hold and increase the value by 1. I'm trying to create a way to track hours spent in versions (ex. v1.0 has been used for 10h, v1.1 has been used for 3h and v1.5 which has been used for 37h) of application, I was thinking that this is the best idea to store data since user won't be able to change the value in an easy way. Any suggestions how to even start? Or maybe is there any easier way to do it?
6 Replies
mtreit
mtreit17mo ago
I've never heard of Properties.Settings in 20+ years of .NET programming. In modern .NET you usually get configuration information from the IConfiguration interface, which can be populated through a variety of means (config files, environment variables, etc.)
Omnissiah
Omnissiah17mo ago
if you store it in settings then how do you read it? wouldn't be better is you sent it via http to a tracking endpoint of yours?
With Blue Horns
With Blue HornsOP17mo ago
That's an interesting situation lol Fully offline would be nice + Properties.Settings.Default.WhateverNameYouUse and you can use it to read it, maybe set label to it or something
jcotton42
jcotton4217mo ago
this sounds like mutable settings I would just seriailzie a dictionary to JSON or something @withbluehorns
With Blue Horns
With Blue HornsOP17mo ago
I will check it out then, thanks
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server