<p>Would like to programmically change the connecton string for a database which utilizes the membership provider of asp.net within a windows application. The system.configuration namespace allows changes to the user settings, however, we would like to adjust a application setting? Does one need to write a class with utilizes XML to modify the class? Does one need to delete the current connections (can one select a connection to clear) and add a new one? Can one adjust the existing connection string?</p>

You can programatically open the configuration with using the System.configuration namespace:
```
Configuration myConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
```
Then you can access the connection strings collection at:
```
myConfig.ConnectionStrings.ConnectionStrings
```
You can modify the collection however you want, and when done call
```
.Save()
```
on the configuration object.