Dave Burke : Freelance .NET Web Developer specializing in Online Communities

Quickstart on Application Property Settings in VS2005

This is a quickstart on a new VS2005 feature, Application Property Settings.  It's one of the features that is so simple and useful that you wonder why no one thought of it before.  But hey, as a product gets better--and smarter--it's supposed to get simpler, right?

You'll need a Properties subfolder in your project with a Settings.settings file, which your project doesn't have by default.  To get your bad self Property Settings enabled, right-click on the Project in Solution Explorer and select "Properties" from the popup window.  A blank content window appears with a link "...click here to create a default settings file."  (Shown in first pic below.)

Now you can enter your property settings, and not just ConnectionStrings or URLs!  To reference the property for, say, a connection string, the format would be

string _Connection = YourApplication.Properties.Settings.Default.YourConnectionName;

 

Comments (0) | Post RSS RSS comment feed

Posted on 6/29/2005 5:25:00 PM by Dave Burke
Categories: .NET
Tags:

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke