How to read and write settings to App.config(Configuration in C# .NET 2.0)

It's really simple but not clear in MSDN.

Read

Write

Hope this helps.

Feel free to subscribe to our RSS feed.

Comments

Very helpful thanks.

One note, it didn't show up in my initial search for;

read write configuration file c#

but I did find it when I searched for

read write config c#

Cheers.

Very helpful. I think msdn was written by cyborgs

I have an app.config------
<?xml version="1.0" encoding="utf-8" ?>




connectionString="Data Source=localhost\sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient" />

I have a winform which will take input from user to specify SQL ip address where I want to put code to write ConnectionString to the app.config file. how to do this?

Wow free space!
Super hosting provider might be here!

Is it Google?