关键是要创建System.Configuration.Configuration对象,这个对象没Save()方法
//创建
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
//修改配置文件的内容
config.AppSettings.Settings["path"].Value = this.txtPath.Text;
config.ConnectionStrings.ConnectionStrings["大兴渗压计"].ConnectionString = txtGKPZ.Text;
//保存修改
config.Save();