Save and reload app.config(applicationSettings) at runtime

前端 未结 4 490
攒了一身酷
攒了一身酷 2020-12-01 16:57

I\'ve stored configuration of my application in the app.config, by Visual Studio I\'ve created some application key on the settings tab of project properties dialog, then I\

4条回答
  •  既然无缘
    2020-12-01 17:24

    Aleroot's code for updating values worked fine. In spite of Properties.Settings being write only (no set).

    To refresh, this worked for me: ConfigurationManager.RefreshSection("applicationSettings");

    But I'm using this to access the parameter: string test = Properties.Settings.Default.MyString; MessageBox.Show("Paramètres/Settings MyString = " + test);

提交回复
热议问题