C# – How to save user inputed data c# winforms

ctextboxwinforms

I wanted to know how to save user inputed data. Like when they type in a text box or check a checkbox and close the application the next time they start it up again, that data that they inputed is there like saved. this is in c# VS2010 .NET 4.0

Best Answer

In the project settings you can add settings, then add an event lister for the FormClosing event.

In that you can put

MyProject.Properties.Settings.Default.MySetting = MyTxtBox.Text;
MyProject.Properties.Settings.Default.MySetting.Save();