PIZZAPERSON
PIZZAPERSON

Reputation: 11

C# Properties doesn't exist

I've been trying to use the built in settings feature in C# but it's not working. When I try and do something like this.BackColor = Properties.Settings.Default.myColor;, Properties doesn't exist. I've tried looking up more info but microsoft provides no info regarding this. Why doesn't it work?

Upvotes: 0

Views: 1033

Answers (2)

Carbine
Carbine

Reputation: 7903

Create the setting for myColor

  1. In Solution Explorer, expand the Properties node of your project.
  2. Double-click the .settings file in which you want to add a new setting. The default name for this file is Settings.settings.
  3. In the Settings designer, set the Name, Value, Type, and Scope for your setting. Each row represents a single setting.

http://msdn.microsoft.com/en-us/library/aa730869%28v=vs.80%29.aspx

Upvotes: 1

Mark Hall
Mark Hall

Reputation: 54532

The easiest way is to create your Settings in your Project Property's Settings section. You do not show how you create it but something like this should work.

enter image description here

Upvotes: 6

Related Questions