1

i want to change application settings at runtime, here part of it:

<applicationSettings>
    <OPCClient.Properties.Settings>
        <setting name="Client_Service" serializeAs="String">
            <value>http://localhost/test/service.asmx</value>
        </setting>
    </OPCClient.Properties.Settings>
</applicationSettings>

i want to modify this value, how can i do it?

eba
  • 673
  • 2
  • 11
  • 22

1 Answers1

1

Have a look at the ConfigurationManager class. The linked MSDN article gives an extensive example on its use, and it allows you to achieve exactly what you are wanting to do.

Also, a worthy note is that you need to add a reference to System.configuration.dll in your project to make use of the class.

Kyle Rosendo
  • 25,001
  • 7
  • 80
  • 118