How can I store the user's choice permanently in c# winform. I wrote this code to fetch the setting:
string my_data_to_do = (string)Settings.Default["MyDataToDo"];
And to save the user's setting I wrote:
if (checkBox3.Checked)
{
Settings.Default["MyDataToDo"] = "Tasks In Hand";
}
else
{
Settings.Default["MyDataToDo"] = "Nothing To Do";
}
This is showing the saved data but only until I exit my application. When I exit and start my program again, all these settings gets automatically removed, and the default data comes, which I saved in Settings.settings file.
Can anyone please help me in this?