How to read configuration settings in NET 2?

G

Guest

Assume I have this in my app.config file

<applicationSettings>
<MyApp>
<setting name="Prefix">
<value>Get</value>
</setting>
</MyApp>
</applicationSettings>

Now, how in the world can I access this setting form MyApp, which this
configuration file is supposed to configure. I want to be able to do this;

sting prefix = <Get the value of Prefix>

This doesn't work Properties.Settings.Default,
Configuration.Settings.Default ... I get errors left and right, there even
isn't such thing as Configuration. Settings .. etc. I don't get it.
 

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