C#读写app.config中的数据
配置文件内容格式:(app.config)
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
    <add key="DemoKey" value="*" />
</appSettings>
</configuration>
读语句:
          String str = ConfigurationManager.AppSettings["DemoKey"];
写语句:
           Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
           cfa.AppSettings.Settings["DemoKey"].Value = "DemoValue";
           cfa.Save();
From: http://gb2013.blog.163.com/blog/static/21735301201021253713453/
    路在脚下
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号