开发者

Updating Custom Config Section

开发者 https://www.devze.com 2023-02-01 16:40 出处:网络
I have a config Section in my app.config that looks like this <configSections> <section name=\"importSettingsSection\" type=\"MyApp.Console.Config.ImportSettingsSection, MyApp.Console\"/>

I have a config Section in my app.config that looks like this

<configSections>
    <section name="importSettingsSection" type="MyApp.Console.Config.ImportSettingsSection, MyApp.Console"/>
</c开发者_如何学JAVAonfigSections>
<importSettingsSection>
    <serviceSettings pollInterval="50" runAt="1400" />
    <systems>
        <add name="System1" lastRunDate="12/01/2010" />
        <add name="System2" lastRunDate="12/01/2010" />
    </systems>
</importSettingsSection>

I was wondering if anyone could help me figure out how to modify the lastRunDate under the systems node at runtime.

Thanks


You can't, you won't have write access to this file. An app.config file is not a database, write it somewhere else. A file, a database, whatever you like.

0

精彩评论

暂无评论...
验证码 换一张
取 消