I'm used to using for Windows Phone, like this:
using System.IO.IsolatedStorage;
public void putString(string key, string variable)
{
IsolatedStorageSettings iso = IsolatedStorageSettings.ApplicationSettings;
if (iso.Contains(key)) //Apenas atualiza os valores das chaves
{
iso[key] = variable;
}
else //Cria novas chaves
{
iso.Add(key, variable);
}
iso.Save();
}
public void getString(TextBox text, string save)
{
IsolatedStorageSettings iso = IsolatedStorageSettings.ApplicationSettings;
if (iso.TryGetValue<string>(text.Name, out save))
text.Text = save;
}
To write a value and get the value, respectively, but in Windows Forms there is IsolatedStorageSettings
which is the easiest method to write data in Windows Forms? It can be just String itself, all I found was via file manipulation, which is more complicated.
Is there a method similar to the one I put up? Used to record a kind of dictionary, with key and value, as it would be faster and at lower cost.