C
C#•10mo ago
SpReeD

Is "System.IO.IsolatedStorage" still a thing in .NET?

I'm wondering if the usage of Isolated storage is still something, someone could consider using today. Plus, is there finally a way to make it persistent across version changes of the application, or do we still need an "updater" software? However, I'm free to hear some alternatives 🙂 How you would store a local Highscore Database/File?
3 Replies
Pobiega
Pobiega•10mo ago
https://learn.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=net-8.0 Most programs store stuff like that in whats often called "appdata"
SpReeD
SpReeDOP•10mo ago
Indeed, I thought there might be some other solution - guess I go with the appdata
Pobiega
Pobiega•10mo ago
so the simplest way is to just
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var myAppData = Path.Combine(localAppData, "ApplicationNameHere");
var pathToHighscores = Path.Combine(myAppData, "highscores.json");
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var myAppData = Path.Combine(localAppData, "ApplicationNameHere");
var pathToHighscores = Path.Combine(myAppData, "highscores.json");
Want results from more Discord servers?
Add your server