How to create variables and configuration settings for C# Windows Project

  • Thread starter Thread starter rohan_from_mars
  • Start date Start date
R

rohan_from_mars

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
 
Hello rohan_from_mars,

Just add the App.config file via the VSIDE -> Right mouse click on ProjectName
-> Add New Item and select App.config

Then, when u compile your app u will get the yourappname.exe.config file
where you can store your text keys/data.

Read there http://samples.gotdotnet.com/quickstart/howto/doc/configclient.aspx
about how to work with this config file

r> I need to store configuration details like Database Connection
r> String, and other config details in a single location so that I can
r> access it from any .cs file of the prj.
r>
r> How is it possible? Thru some particular xml file or a text file??
r>
r> PLZ reply asap as its urgent
r>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top