来源: winform 项目获取app.config 中appSettings节点数据 – 承影剑 – 博客园
< ?xml version="1.0" encoding="utf-8" ?>
然后在winform中cs文件里这样调用:
///
///
///
///
public string GetAppsettingStr(string str)
{
AppSettingsReader appReader = new AppSettingsReader();
return appReader.GetValue(str, typeof(string)).ToString();
}