I am able to read successfully from the following file called UserSettings.txt
:
RegionName AUS
using the following code:
var settings = new MultiAppSettingsBuilder()
.AddAppSettings()
.AddTextFile("~/UserSettings.txt".MapProjectPath())
.Build();
var regionName = settings.GetString("RegionName");
//regionName is "AUS"
However, when I want to write an updated value to the text file in question it is not changed:
var settings = new TextFileSettings("~/UserSettings.txt".MapProjectPath());
settings.Set("RegionName", "UK");
//The RegionName value in the UserSettings file is still "AUS"
There are no errors being thrown.