When I create a console application, I can right-click on a project in Visual Studio 2008 Pro. click Properties> Go To Settings, enter the Application Area option and then access it from the code, for example
Console.WriteLine(Properties.Settings.Default.MySetting.ToString());
When I do the same in a class project and try to assign a scope value to a variable, for example
this.mySettingVariable = Properties.Settings.Default.MySetting.ToString();
I get an error when creating that the "Property Name" does not exist in the current context. "
What am I doing wrong and how can I access Application Scoped properties for a class project?
source
share