I need to store configuration details like Database Connection String,
and other config details in a single location so that I can access it
from any .cs file of the prj.
How is it possible Thru some particular xml file or a text file
PLZ reply asap as its urgent
How to create variables and configuration settings for C# Windows Project
Dylan Smith
There is Built in Mechanism for doing it in .net 2.0 and is called Client Settings. you can use it. Its easy like 1, 2 and 3 Done!
In Solution Explorer expand the node Properties - > Settings, Add a new setting!
You can get and set value of that setting as simple as:
Namespace.Properties.Settings.Defalut.SettingName;
Cheers ;-)
avols143
See this:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=803040&SiteID=1
I hope it'll help! Cheers;-)
FBorda
you can use the App.Config file.
Right click project > add new item > Application Configuration
I'm not sure entirely how to use it but I thought I will tell you how to add it to your project
gburgess
december_i