appSetting Parameter

G

Grey

I want to set an entry in the application configuration file to set the DB path ConnectiongString. What is the configuration file of windows application of C#..and how to set it??
Also, how to retrieve the value in C#
 
H

Hayato Iriumi

You can create configuration file like the following.

[ExecutableName].exe.config

If you are using VS .NET, simple create App.Config under the root of the
project. When you compile the project, VS .NET automatically creates the
..config file for you and put it in bin folder.



I want to set an entry in the application configuration file to set the DB
path ConnectiongString. What is the configuration file of windows
application of C#..and how to set it??
Also, how to retrieve the value in C#
 
H

Hayato Iriumi

System.Configuration.ConfigurationSetting.AppSetting["KeyNameHere"] will get
you the value.

I want to set an entry in the application configuration file to set the DB
path ConnectiongString. What is the configuration file of windows
application of C#..and how to set it??
Also, how to retrieve the value in C#
 

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

Top