<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections> </configSections>
<appSettings> <add key="Language" value="Chinese"/>
</appSettings></configuration>
public static void UpdateAppSettings(string strKeyNewValue)
{
XmlDocument doc = new XmlDocument();
doc.Load(Application.ExecutablePath + ".config");
XmlNode node = doc.SelectSingleNode(@"//add[@key='Language']");
XmlElement ele = (XmlElement)node;
ele.SetAttribute("value", strKeyNewValue);
doc.Save(Application.ExecutablePath + ".config");
}
UpdateAppSettings("English");就这样啊,为什么操作了没效果,不解,请教
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货