I'm trying to use a settings file in VS 2013 to store the text of textBox1.Text and then re-input it when you open the application again.
I have it setup like this.
Settings file is here: http://i.gyazo.com/e3aef293c3b8dbdfab269718de81a310.png
On public Form1() I have this to read the text.
textBox1.Text = Properties.Settings.Default.aaa;
then on saving it I have it like this.
if (checkBox1.Checked)
{
Properties.Settings.Default.aaa = textBox1.Text;
}
But I get the error
'WindowsFormsApplication1.Properties.Settings' does not contain a definition for 'aaa' and no extension method 'aaa' accepting a first argument of type 'WindowsFormsApplication1.Properties.Settings' could be found (are you missing a using directive or an assembly reference?)
Thanks for the help.
I had this problem. The issue was that Settings.settings was in both the Properties folder and the root folder. I replaced the one in the Properties folder with the other one. I think this issue can occur if you unload and reload a Project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With