110,533
社区成员
发帖
与我相关
我的任务
分享
XmlDocument xDoc = new XmlDocument();
xDoc.Load(Application.ExecutablePath + ".config");
XmlNode xNode = xDoc.SelectSingleNode(节点);
string str= xNode.InnerText;
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="test" value="testvalue"/>
</appSettings>
</configuration>
using System.Configuration;
public void Test()
{
MessageBox.Show(System.Configuration.ConfigurationManager.AppSettings["test"]);
}